Page 2 of 2

Re: How can i save a list of gameobjects?

Posted: Thu Mar 07, 2024 4:58 pm
by Notso
In another post (a duplicate I think) you have a lot of fields private.
Are the fields not saving private? Try making everything public for a test and see if es3 then works...(if it does then you can just make get/set for those fields)
You can open the save file and see the values it is saving as well.
I had an issue where it saved the values but did not load them. Have you checked to see if it is actually saving what you want saved?
Narrow down the issue, it sucks, but it does work. I have more than 1 post on my issues figuring this out! :)
Have you looked at the TYPES tab of es3 menu and type in your script to see if the types are checked? (only use this if no other option works, not sure how it works but I had to do it to save my zombies with a lot of custom fields)

Re: How can i save a list of gameobjects?

Posted: Sun Apr 14, 2024 1:42 pm
by Recktardeded
Thank you for your reply! But i think my script logic is flawed, because it requires multiple floats and enums to get initialized properly on Awake, but i ve decided to use a different approach, where i would save just the floats and whatever other elements i d need for the gameobject, so i would have the following keys: ES3.Save<int>("go1",go1) - this is to save the gameobject itself, then ES3.Save<float>("go1_float",float) and so on, and for my purposes it is working ok. Have a great day!