I don't have a problem writing (complex) code, once I know a working solution. Right now I'm trying to find anything that will work without killing performance.
Basically what happens is this:
- Character turns around >> I flip z order of children (once)
- Character gets animated (by mecanim) >> the animation restores the pre-flip z order
Right now the only way to avoid that would be to reorder the sprites on LateUpdate, after the animation happened. But I can imagine reordering 1000s of sprites every frame is not going to be good for performance.
How would you solve this (with a manager or without)?
This seems like a common problem to me, when using animated characters that are built from sprites. How is this usually done?