Forum rules - please read before posting.

Unity 4.3 (2D) Sorting Layers

edited August 2014 in Engine development
I see in this video that Unity 2D has now included Sorting Layers. (at around 2 mins in). 


Will this have a bearing on AC's 'sorting map' methodology for 2D or is the existing sorting map method already as good as its going to get?

Or have I missed something which has already been added by watching an older tutorial - in which case :-??

Cheers - Xidore

Comments

  • I think AC inherently uses those sorting layers already. The sorting map affects the order in a layer, but you can also manipulate an object's actual sorting layer. It works pretty well I must say.
  • Sorting layers in Unity is not used by Adventure Creator, just the default layer is used. The sorting map can decide the order within the default layer, with the Order in Layer feature.

    Before using Adventure Creator I played around a bit with sorting layers. The API is not very good though, it's very complicated to switch sorting layer order for instance. So in the end its easier to just use the Order in Layer.
  • Yea I didnt think it did. Interesting to hear your perspective Guran. I wonder whether setting a background layer would conflict with AC though. I expect it shouldn't.

    Also the video describes a 'new parallax' script. I assume this is similar to the one AC 2D utilises.

    One the one hand, if Unity comes 'natively' with more efficient or improved methods of achieving things in AC, then I see great advantage in that. On the other hand, if it aint broke don't fix it :)
  • I am using multiple unity sorting layers in my AC project and so far it hasn't given me any problems. I made a few extra layers in addition to the Default one, namely Background, Midground, and Foreground, and in a few scenes I'm using those on the Sprite Renderer component to control the depth sorting, instead of using AC's sorting map. You can change the sorting layer a gameobject appears on at runtime with the Character: Change Rendering action.

    This method is slightly less reliable because if you accidentally overwrite your tags manager preference file, it wipes the newly created layers. But together with the order in layer property they provide a lot more flexibility in some cases.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.