Currently I'm working of adding objects to my maps and encounered the following issue/challenge.
The sorting order of all GameObjects is incremented for each imported object, i.e. layers and objects in object layers.
This leads to all layers above object layers changing sorting order whenever the amount of objects changes.
As some scripts, e.g. SpriteDepthInMap rely on a defined layer number, their math gets messed up by this.
My suspicion is that the higher sortingOrder combined with a lower number of layers messes up the intervals the Depth buffer uses between horizontal slices of the map.
I will investigate further to maybe pinpoint what exactly happens, but any help would be appreciated.
Below is an abridged example XML showing the increasing sorting order
Currently I'm working of adding objects to my maps and encounered the following issue/challenge. The sorting order of all GameObjects is incremented for each imported object, i.e. layers and objects in object layers. This leads to all layers above object layers changing sorting order whenever the amount of objects changes. As some scripts, e.g. SpriteDepthInMap rely on a defined layer number, their math gets messed up by this. My suspicion is that the higher sortingOrder combined with a lower number of layers messes up the intervals the Depth buffer uses between horizontal slices of the map.
I will investigate further to maybe pinpoint what exactly happens, but any help would be appreciated.
Below is an abridged example XML showing the increasing sorting order