I'd like to use some of the 3D assets -- models, characters and most importantly particles -- that I've bought from the asset store in a 2D game. However, it looks like 3D assets can't be given a 2D layer, and so always seem to be rendered behind all the 2D stuff. Is it possible to somehow get the 3D assets to work in the new 2D system? Thanks!!
If a 3D object is positioned closer to the camera on the Z axis than a sprite, it's drawn on top, at least that I've seen. --Eric
Unfortunately it doesn't seem to work like that. It used to, but the new 2D version seems to keep all 2D stuff in front of all 3D stuff, regardless. It's difficult to tell, but the position of the particle is in front of the "ground" in this screen shot, but you can see the particle is being drawn behind all the 2D stuff. It's fairly large because the view camera is really close to it. I've been able to put 3D models in front of 2D stuff, however, but the 3D models don't seem to react to 2D colliders, as far as I can tell.
For now you can assign renderers to sorting layers using code. See the Particle system that's in the Hierarchy of the 2D demo, it has a script to handle that. Should be something like Code (csharp): your3dgameobject.renderer.sortingLayer = "StringNameOfLayer";
Ah, perfect. This one line in a script attached to the object will work: Code (csharp): function Start () { renderer.sortingLayerName = "Character"; }
One followup @Will Goldstone -- is it possible to do a similar thing with the ordering? I wasn't able to find that in the demo scripts.