Handling reference types

Discussion and help for Easy Save 3
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Handling reference types

Post by Joel »

Hi there,

The version of Easy Save which did that has been depreciated for a long time so we're unable to provide it. This was done internally using reflection, and is non-trivial.

Generally if you want to achieve that now you should use the method I mentioned above.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Uchiha I_T_H_
Posts: 20
Joined: Tue Apr 20, 2021 4:34 am

Re: Handling reference types

Post by Uchiha I_T_H_ »

yeah, so you do that recursively?
I mean I think you would have used something like fieldInfo.setvalue()
but what if the field is a reference type then you have to set those embedded fields also.
Maybe you would have performed that on 1st or second layer.
I also realized unity json utility also does that till 1st layer of fields and after that it creates new object than setting existing object values.
Maybe I was overthinking .
Anyway thanks you are quite a helping guy.
kudos.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Handling reference types

Post by Joel »

Hi there,

We indeed did that recursively using methods such as FieldInfo.SetValue.

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