Hey there. Just getting kind of situated with Easy Save, which has been pretty awesome so far. I'm working on a city builder game, and when saving, I'm saving the buildings, pawns, etc using ES3.Save("thing", Pawn/Building), etc. When loading, I'm using something like
Code: Select all
HarvestableResource resource = ES3.Load<HarvestableResource>($"Resource_{GUIDs[i]}");
which creates a gameObject with the component I've saved. That's fine, and I can pull the sub entry from that (A GUID that points to a ScriptableObject that holds a reference to the prefab I want to instantiate),
but I'm curious if I could read a sub entry in the save file without actually using Load if that makes sense. It'd also be useful because my Buildings, Pawns, etc, have a Start function that generates things if they're first being placed. Something like
Code: Select all
ES3.FindEntry("Building_GUID").SubEntry
to just read the value - in my case an identifier that points to a ScriptableObject that holds the data for that particular object.
I have tried just maintaining the reference to the ScriptableObject, but for some reason when I load it keeps showing up as null. I don't have the original code for that, at this point but I may accidently swing back around to that haha.