Page 1 of 1

Not Saving a child?

Posted: Thu Feb 22, 2024 6:09 pm
by Notso
OK...
For the zombie, I Right clicked and made ES3Prefab from asset window (not hierarchy).
I have a zombie set up as an empty parent, under this parent I have 2 children.
1 called AI and the other TargetTrigger.
On Load the zombie was no where in the scene, the parent was there and the 1 child targettrigger but not the AI (which is the mesh and all the scripts).
As a test, I set my load to be 20secs after scene load, so once the new scene loaded but before the save loaded I paused.
In the hierarchy the AI was there and in working order. I then unpaused with the zombie selected. On the load game it deleted the AI child...
However I have a ES3GameObject script on it. Transform and some scripts checked to save like the other one I just copied)
This is set up the same as the other zombie in the scene which does work. Which is weird (they are totally different meshes and prefabs).
1 works as expected the other gets the child deleted.
No idea how I would even try to duplicate this in a new project, hopefully you have something I can look at or try to fix this.

Re: Not Saving a child?

Posted: Fri Feb 23, 2024 8:51 am
by Joel
Hi there,

It would be very hard for me to understand what is happening without being able to see a project which replicates it. Please could you show me the code you're using to save and load and screenshots of all of the GameObjects involved and their Components?

All the best,
Joel

Re: Not Saving a child?

Posted: Fri Feb 23, 2024 3:31 pm
by Notso
Sure, I will have to do it Sunday (Working 10hr nights makes it hard to make time)
Will submit the requested in a day or 2.
What I have noticed is the AIentity has the same transform ID..but that shouldn't matter if the ES3 ID is different right?

I DM a couple links.

Re: Not Saving a child?

Posted: Mon Feb 26, 2024 11:44 pm
by Notso
So in relation to this error...
Is there some way to put a debug in to at least see what script or object it is referencing to narrow it down, well, more specific which object in the list it is trying to use?
It is so far only that 1...but it totally matches the others, no extra scripts or anything...
I remove C1 the other 3 save/load as expected. I add C1, I get the error...

FormatException: Expected '{' or "null", found ','.
This is the code it references in your script.

Re: Not Saving a child?

Posted: Tue Feb 27, 2024 9:32 am
by Joel
Hi there,

I've edited your post as posting our source code publicly is against the EULA.

Because it's a parsing error it's not possible to attribute it to an object at that point because the object hasn't been parsed. Generally you would isolate it to an object by reducing the variables which are being saved/loaded (i.e. deselect objects from the ES3GameObject Component to isolate to a Component, and then mark variables within that to not be saved until you've identified the object).

All the best,
Joel

Re: Not Saving a child?

Posted: Tue Feb 27, 2024 3:37 pm
by Notso
Ok, sorry about that, didn't even think of that. (the posting of the method).
Yeah, I was trying and even es3nonserialized the entire script I thought it was, instead it is something else about that 1 particular object I just can't find and knowing what script or line in the file it is trying to read would have been helpful.
Hate to have to throw away a perfectly good zombie due to an error I can't find!
But thanks anyway, I know you have been trying to help, and there are just so many different variables it could be.