Hello All,
I am working on save state functionality using PlayerPrefsx class. It correctly save the state of all the game object in my game but to save the state of all game object in a current scene i write a code in update function which effects on rendering issue.
Is there any other way or idea you suggest to me so that i can save a state of game when i quit the application.
Thanks
You can save actual objects out in binary format, and then load them back in when you start your game.
This process is called serialization and deserialization.
There is a post about it here: http://www.frictionpointstudios.com/blog/2011/3/31/using-protobuf-net-serialization-in-unity-iphone.html
Your question is a bit equivocal
I think maybe you mean you want to put quit codes somewhere else instead of Update(), right?
If so, check this out: Unity - Scripting API: MonoBehaviour.OnApplicationQuit()
Slight problem, in that applications don’t quit on iOS, they simply pause… They can then be terminated from the fast-app-switch menu but no additional code will be executed, so Mika’s suggestion of OnApplicationPause is more apt 