I have a scene with OnStart action Character: Change rendering: Order in Layer: -10 (the Player should be hidden behind the scene). Later in the game, the order changes to 5 and you can see the Player properly on the scene. I save the game when the order is 5 and turn off the Runtime in Editor.
When I run the game again and load this save, the Player Order in Layer is -10 again (checked in Hierarchy on Runtime). I tried to add some remember components to the Player prefab, but I didn't find anything that would work (tried Remember Transform, Remember Navmesh).
This does not happen when I load the game immediately after saving it without turning the game off and back on again in Editor. Also, when I build the game, the Player is normally visible. But I am worried about the Layer Order values (how come I can see it in the Built game when the order is incorrectly -10 according to the editor?) and that it will cause some issues in the future.
Is this some bug, or am I not understanding something properly? Is there a way to remember the Order in Layer?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The sorting order should only be saved/loaded if it was locked to that value.
What are your AC/Unity versions, and can you share screens of the Actions / Player root / Player sprite child involved?
Unity 2022.3.9f1, AC 1.81.2.
This is the part of the OnStart cutscene. Later there is the same Action changing the order to 5:
This is the Player prefab hierarchy:

Here are components of the Player root

Here are components of the Player rig. IKt includes the Sorting group.

This is the Player rig during runtime, after loading, when the value should be 5. BWhen i just play the scene and i check it on runtime, it changes properly to set values. Only after load (after the game was restared) it gets the -10.

It may be down to the use of the Sorting Group, which the save data doesn't explicitly cater for. I'll see if this can be amended as part of the next release.
Thank you. Is there a way I can circumvent this somehow in the meantime? I tried adding a Sprite renderer instead of a Sorting Group, but as expected, it didn't work.
Also, I am using the SUC_FrameFlip script to flip my character's Left/Right animations. Sometimes i turn it On and sometimes Off (within a single scene). But the current state of it is not saved either. Is there a way to solve this?
No, but the update should be released soon.
Instead of turning it off, you could amend it to instead react to e.g. a Global Boolean variable, so that it has no effect if the value is False.
Something like this at the top of its Update function:
Thank you, that solves it.