Search found 20 matches

by Uchiha I_T_H_
Wed Jun 09, 2021 11:49 am
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

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...
by Uchiha I_T_H_
Wed Jun 09, 2021 9:26 am
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

you mentioned that easy save behaves that way previously. How you guys achieved that? I got tired searching all over the google on how this can be achieved but I didn't find any.(I found automapper library but it doesn't work or maybe I don't know how to work with it) Also if possible, How can I get...
by Uchiha I_T_H_
Wed Jun 09, 2021 9:14 am
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

Anyway forget about as I have changed my plans and no longer need loadInto.
for your own interest you can check it out though.
thanks for the help.
by Uchiha I_T_H_
Wed Jun 09, 2021 8:36 am
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

it should reference to same list object after loading given no new object is created rather values are injected in the existing objects. check the video I shared or rather try to change the values of the list1 and check if those values reflect on list2( I do that by setting breakpoint you can assert...
by Uchiha I_T_H_
Tue Jun 08, 2021 2:41 pm
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

sure, I will send it to you tomorrow.
by Uchiha I_T_H_
Tue Jun 08, 2021 12:24 pm
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Re: Handling reference types

its not like that.
Also loadInto doesn't load the data to existing objects but rather create new objects and point the reference to it.
It is also possible as Unity jsonUtility.FromJsonOverwrite() does that.
am I unaware of some features or it is not yet available?
by Uchiha I_T_H_
Tue Jun 08, 2021 9:57 am
Forum: General Discussion
Topic: Handling reference types
Replies: 12
Views: 2086

Handling reference types

I have noticed that easy save create a new individual objects for reference types.
I want to know easy save can preserve reference?
by Uchiha I_T_H_
Mon May 24, 2021 4:41 pm
Forum: General Discussion
Topic: Json exception occured
Replies: 4
Views: 847

Re: Json exception occured

Although you guys are the experts in this field but I think you can check via reflection. just stop the compilation if you find the es3 autotype reference is null. I use this asset quite often and you can borrow its code if you like to- https://github.com/redbluegames/unity-notnullattribute If I wou...
by Uchiha I_T_H_
Sun May 23, 2021 12:56 pm
Forum: General Discussion
Topic: Json exception occured
Replies: 4
Views: 847

Re: Json exception occured

Ok, I found the issue. Easy auto save is saving a component which was no longer there that's what causing this.
Although there should be check for this type of case.
Anyways , I will patch easy save code myself for this case.
by Uchiha I_T_H_
Sun May 23, 2021 12:49 pm
Forum: General Discussion
Topic: Json exception occured
Replies: 4
Views: 847

Json exception occured

FormatException: Expected '}', found ']'.

I have validated the json of saved files and its ok but I am getting this error. what is the issue?
It occurred when using autosave feature