In editor I finally got it working. existing items, instantiated, player, AI, inventory... works great. time to make a build...
First I got a bunch of null references, I think I fixed those, but in a build this shows in the log (see below all this).
(I removed the load enemies and the rest of the save appears to work so just need to figure out why this is an issue)
So on further tracking it down it is in my AI. (works in editor)
I drag my AI parent to this list:
Code: Select all
public List<GameObject> enemies = new List<GameObject>();
Child has es3gameobject to save the ai script.
I added the es3types to get it to save what I needed
Code: Select all
ES3.Save("Enemies", enemies);
Code: Select all
enemies = ES3.Load("Enemies", enemies);
Code: Select all
ES3.LoadInto("Enemies", enemies);
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x00011] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:274
at ES3Types.ES3Type_SkinnedMeshRenderer.ReadComponent[T] (ES3Reader reader, System.Object obj) [0x005d9] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_SkinnedMeshRenderer.cs:133
at ES3Types.ES3ComponentType.ReadUnityObject[T] (ES3Reader reader, System.Object obj) [0x00001] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ComponentType.cs:36
at ES3Types.ES3UnityObjectType.ReadObject[T] (ES3Reader reader, System.Object obj) [0x00080] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3UnityObjectType.cs:64
at ES3Types.ES3ObjectType.ReadInto[T] (ES3Reader reader, System.Object obj) [0x00044] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:75
at ES3Types.ES3Type_GameObject.ReadComponents (ES3Reader reader, UnityEngine.GameObject go) [0x00116] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:226
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader, System.Object obj) [0x00258] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:176
at ES3Types.ES3ObjectType.ReadInto[T] (ES3Reader reader, System.Object obj) [0x00044] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:75
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader) [0x0015d] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:136
at ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) [0x00038] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:52
at ES3Reader.ReadObject[T] (ES3Types.ES3Type type) [0x00017] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:253
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x0008a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:282
at ES3Types.ES3CollectionType.ReadICollection[T] (ES3Reader reader, System.Collections.Generic.ICollection`1[T] collection, ES3Types.ES3Type elementType) [0x00021] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3CollectionType.cs:52
at ES3Types.ES3ArrayType.Read (ES3Reader reader) [0x00007] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3ArrayType.cs:36
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x00056] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:278
at ES3Reader.Read[T] () [0x00001] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:126
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader, System.Object obj) [0x0021a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:169
at ES3Types.ES3ObjectType.ReadInto[T] (ES3Reader reader, System.Object obj) [0x00044] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:75
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader) [0x0015d] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:136
at ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) [0x00038] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:52
at ES3Reader.ReadObject[T] (ES3Types.ES3Type type) [0x00017] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:253
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x0008a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:282
at ES3Types.ES3CollectionType.ReadICollection[T] (ES3Reader reader, System.Collections.Generic.ICollection`1[T] collection, ES3Types.ES3Type elementType) [0x00021] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3CollectionType.cs:52
at ES3Types.ES3ArrayType.Read (ES3Reader reader) [0x00007] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3ArrayType.cs:36
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x00056] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:278
at ES3Reader.Read[T] () [0x00001] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:126
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader, System.Object obj) [0x0021a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:169
at ES3Types.ES3ObjectType.ReadInto[T] (ES3Reader reader, System.Object obj) [0x00044] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:75
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader) [0x0015d] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:136
at ES3Types.ES3ObjectType.Read[T] (ES3Reader reader) [0x00038] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:52
at ES3Reader.ReadObject[T] (ES3Types.ES3Type type) [0x00017] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:253
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x0008a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:282
at ES3Types.ES3CollectionType.ReadICollection[T] (ES3Reader reader, System.Collections.Generic.ICollection`1[T] collection, ES3Types.ES3Type elementType) [0x00021] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3CollectionType.cs:52
at ES3Types.ES3ArrayType.Read (ES3Reader reader) [0x00007] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3ArrayType.cs:36
at ES3Reader.Read[T] (ES3Types.ES3Type type) [0x00056] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:278
at ES3Reader.Read[T] () [0x00001] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:126
at ES3Types.ES3Type_GameObject.ReadObject[T] (ES3Reader reader, System.Object obj) [0x0021a] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Unity Types\ES3Type_GameObject.cs:169
at ES3Types.ES3ObjectType.ReadInto[T] (ES3Reader reader, System.Object obj) [0x00044] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\ES3ObjectType.cs:75
at ES3Reader.ReadObject[T] (System.Object obj, ES3Types.ES3Type type) [0x0000d] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:243
at ES3Reader.ReadInto[T] (System.Object obj, ES3Types.ES3Type type) [0x0006c] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:296
at ES3Types.ES3ListType.ReadInto (ES3Reader reader, System.Object obj) [0x00047] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Types\Collection Types\ES3ListType.cs:92
at ES3Reader.ReadInto[T] (System.Object obj, ES3Types.ES3Type type) [0x00042] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:292
at ES3Reader.ReadInto[T] (System.String key, T obj) [0x00051] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\Readers\ES3Reader.cs:232
at ES3.LoadInto[T] (System.String key, T obj, ES3Settings settings) [0x0007c] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\ES3.cs:600
at ES3.LoadInto[T] (System.String key, T obj) [0x00001] in V:\notso_NotsoPC_675\depot\Assets\Plugins\Easy Save 3\Scripts\ES3.cs:555
at NotsoSave.Load () [0x00043] in V:\notso_NotsoPC_675\depot\Assets\Dev\Scripts\NotsoSave.cs:144 THIS IS THE LOAD ENEMIES LINE IN SCRIPT
at NotsoSave.clearinventorylists () [0x00039] in V:\notso_NotsoPC_675\depot\Assets\Dev\Scripts\NotsoSave.cs:131
at NotsoSave.Awake () [0x0000f] in V:\notso_NotsoPC_675\depot\Assets\Dev\Scripts\NotsoSave.cs:41