Transform loading order

Discussion and help for Easy Save 3
Post Reply
Liens
Posts: 18
Joined: Thu May 07, 2020 9:06 am

Transform loading order

Post by Liens »

Hello, I've been experiencing an issue where I've saved and then loaded a gameobject with children. But because ES3 loads the localPosition first, then loads the parent afterward, the loaded child is in the wrong position.

Meaning at the time when localPosition is set, parent = null which means it's setting world position (since null parent localPosition is the same as world position) before parenting it to the parent. Is this intentional behavior or am I messing something up?

Cheers.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Transform loading order

Post by Joel »

Hi there,

In these cases it’s usually required to load twice: once to load instances, and again to load their fields correctly.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Liens
Posts: 18
Joined: Thu May 07, 2020 9:06 am

Re: Transform loading order

Post by Liens »

Thanks. I'm not sure if it's a permanent fix but I had an idea to edit ES3UserType_Transform, putting the writer.Write("parent") line first means it will load first?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Transform loading order

Post by Joel »

Hi there,

This could also be a solution for your situation, depending on whether your issue is related to parent load order or general load order.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply