I just got the asset and so far I'm feeling good about it.
Easy Save saves a Prefab pretty easily BUT I also need it to save the Prefabs changes, such as if a child of the prefab has been activated or deactivated or deleted or a change in a child's Material.
Is this something that can be done? I can't save the prefab either as it will overwrite all of the Prefabs.
I can get a list of GameObjects and Save them with new save names but how do I load them without knowing the names?
Using this code to save
Code: Select all
private int wallsNum;
public void SaveGame()
{
foreach(wallData i in GameObject.FindObjectsOfType<wallData>())
{
ES3.Save<GameObject>("newWall" + wallsNum++, i.gameObject);
ES3.Save<int>("amountWalls", wallsNum);
print("newWall" + wallsNum);
}
ES3.Save<int>("moneyValue", money.currentMoney);
ES3.Save<bool>("tutDone", jellyPad.tut);
}
public void LoadGame()
{
int moneyValue = ES3.Load<int>("moneyValue");
bool tutDone = ES3.Load<bool>("tutDone");
int amountWalls = ES3.Load<int>("amountWalls");
money.currentMoney = moneyValue;
jellyPad.tut = tutDone;
while (amountWalls >= 0)
{
ES3.Load<GameObject>("newWall" + amountWalls--);
print(amountWalls);
}
}
There is also an issue that some loaded GOs are in the wrong position. Not by a large margin but in the wrong position. It seems to effect the last loaded object more than anything. Also when there is a lot of GOs to save it doesn't seem to be able to load them in and says they couldn't be found.
So to recap there is the above issue and not being able to save the Prefabs changes.
Doesn't seem to able to deal with higher numbers of GOs either. I created a simple set up with around 72 GOs and it says it can't find them.
I'm not thinking its creating an extra Prefab. It also creates new Objects that weren't part of the save file once loaded.
I know it's my Code that is killing it. But I'm just not sure where. Something must be wrong with the loop.
But in regards to Saving changes made to Prefabs I have no idea.