Save and load (737346)

Hi there i m working on break breaker game and i really don’t know how to save and load game .

When i save data it appears in persistent data path and when i try to load it isn’t loading (i.e. not working)

My script is fine but i am making prefab of brick arrangement and called that arrangement as a level loading one by one through array and in hierarchy window i puted empty game object (to load level one by one) through it .

That’s my logic but saving and loading is not working so please help i have code of binary sterilization also but don’t know how to implement it.

Thanks for help in advance.

Create a class for the information you want to save.

E.G.

[System.Serializable]
public class SaveData
{
    public int score;
}

To save:
Use the binary formatter to serialize to the Application.PersistantDatapath;
To Load:
Create an instance of the SaveData class. then load your saved info with the binary formatter Deserialize.

Remember serialized data must be marked with the [System.Serializable] header.

More information on the basics of serialization can be found here if your get stuck.