Hey Rainy, When I add a sprite render and change the sorting layer to "background", it automatically renders in front of the baked AnyPortrait object blocking the character. I want to render the character in front of the background and control this via sorting layers. If I keep the sorting layer as default, it does render behind the object (as desired), but I don't know where in the portrait object that it's controlling that. I am using an Orthographic Camera.
So more specifically, I have 3 sorting layers, "default", "background" and "character" - and I want to set the AnyPortrait object to "character" so that it appears in front of the background. Is there a straightforward way to do so? (I can't work out how since the object is not a sprite, and the AnyPortrait mesh structure is more complicated than a mesh collider)
Hi!
Sorry for the late reply.
There are two ways to set the Sorting Layer.
The first way is to set it in the Bake Dialog.
You can open the Bake Dialog and set the "Sorting Layer" in the Settings tab.
The second way is to add the Sorting Group component directly to the character.
When you set the Sorting Layer in the Sorting Group component, it will take precedence over the lower Sorting Layer settings.
The following manual related to this may be helpful:
https://rainyrizzle.github.io/en/AdvancedManual/AD_SortingLayer.html
If your problem persists, please leave a comment!
Thank you.