- Home /
 
What to serialize when app pauses
I'm working on a mobile game and the scene contains:
3 different gameObjects- each contains a script to a static class-singleton (3 classes total)
20 gameObject prefabs with properties scripts
What do I need to serialize, when I get an incoming call for example?
By reading the Unity documentation, I can see that there is a [built-in serialization][1], is that true?
My questions are:
Can I serialize the 3 singleton classes? (one of them is the game manager) I thought that I can't serialize static classes
Does unity use the built-in serialization to store info about the prefab's transform, and other components attached like AudioSource properties, scripts and animation
What happens if the animation is pausing when in the middle of playing? I don't want to lose critical info when pausing a game and starting again.
[1]: https://docs.unity3d.com/Manual/script-Serialization-BuiltInUse.html
Your answer