- Home /
Question by
Himani_123 · Jun 06, 2014 at 10:00 AM ·
unityserializer
How to store texture and color of gameobject
i used the unity serializer to save the game and load it..but having a problem when i save and load it from button click on main menu.the texture i used on dynamic objects get null(that means it doesnot load texture and colors)and if i click again on new game to open a fresh game then also texture does not appear on the object.i search alot about this didn't find any solution.please tell me what should i do to get it..here is the snippet i used to resume the game.
if(GUI.Button(new Rect(180,130,140,20), "Resume Game", mystyle)) {
New =false;
Load = true;
if (!LevelSerializer.IsDeserializing)
{
LevelSerializer.Resume ();
}
if (GUI.Button (new Rect (10, 70, 70, 20), "Yes "))
{
LevelSerializer.Checkpoint();
//PlayerPrefs.SetInt("level01", Application.loadedLevel);
Application.LoadLevel("level02");
}
Comment