I've got a problem that it seems i cannot solve alone...
My player has a List that that hold the inventory, the object inside it are simple c# classes (eg. weapons).
Inside those classes i have another List which are weapon mods(c# classes too).
Inside those weapon mods i can have as an example a scope model to load at runtime held in a public GameObject variable.
When i save the inventory using (items is the List) :
Code: Select all
ES3.Save("MainInventory", items);
Code: Select all
"scopeModelGO" : {
"_ES3Ref" : "3925392695620607158"
},
Code: Select all
items = ES3.Load<List<IInventoryItem>>("MainInventory");
The same for the projectile prefab(and this is stored on the weapon class, not is the mods).
The weapons are there with all the variables backed up, except for the references to the prefabs
I've done the " Right click the prefab and select Easy Save 3 -> Enable Easy Save for Prefabs" for every single scope and projectile prefab, and those are in the Easy Save 3 Manager under ES3Prefabs.
I also checked every field under the classes in the Type tab of easy Save 3 window, infact they seem to be serialized properly. i think it's just a loading problem
I'm sure i'm missing something important but i cannot seem to find out what it is...