Hi! I've got a strange issue I could do with some help on!
For some reason I can't edit my player prefab's 'order in layer'. If I go to change it, it ignores what I've typed and just bounces back to whatever the value was before. What's **even weirder **is that it seems every time I make changes to the player prefab, it decides to jump him up a few sorting layers. So I keep having to bump the set geometry values up to compensate (where he's supposed to be behind something).
This has been the case for a while, to the point where I now have silly order values in my scenes, with things in the 50s.
I should say that this happens whether I try in the prefab editor or (as in the video) a scene itself.
Any ideas why this is happening? Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @adambunker.
This is due to the Player's Follow Sorting Map component, which - by default - will adjust a character's Sorting Order accoring to where they are on the Map. You can uncheck Edit-mode preview? to prevent this adjustment occuring during Edit mode.
AC's Sorting Map is an object used to control a character's appearance as they move around a scene - affecting their scale and sorting order as they move vertically.
If you wish to rely instead on Unity's own sorting, to avoid having to let AC adjust sorting orders, uncheck Affect character sorting? in your scene's Sorting Map Inspector. You can then rely on Unity's Transparency Sort Mode options to control the order in which sprites are drawn based on their position in the scene.
Thanks for this, Chris! I think unchecking 'Edit-mode preview' has solved the issue in this instance.