how can I pass value between two scenes??
I've tried writing the value on a file in the first scene,then reading
it in the second scene..
but it seems like the value can't be read from the file! although I
checked when the game ended and the value I needed is written on the
file!
If anyone can help me I'll really appreciate it.
Thanks
There's a static function DontDestroyOnLoad that you can call to make
a GameObject persist across scenes. Typically, applications have a
game state manager that holds data and then resets key objects after
loading a new scene. There's some more information on the function
here:
http://unity3d.com/support/documentation/ScriptReference/Object.DontDestroyOnLoad.html?from=GameObject
If that's not your question, and it's more specific to ICM, can you
clarify what information you want to persist and how you are currently
trying to store it?
Thanks,
dba