Page 2 of 2

Re: Handling reference types

Posted: Wed Jun 09, 2021 10:43 am
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

Re: Handling reference types

Posted: Wed Jun 09, 2021 11:49 am
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.

Re: Handling reference types

Posted: Wed Jun 09, 2021 12:18 pm
by Joel
Hi there,

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

All the best,
Joel