#Editor value not saving

1 messages · Page 1 of 1 (latest)

fringe aspen
amber mist
#

so if i write on that page you see it?

fringe aspen
#

Can you share the MonoBehaviour and the editor script? You can use this to share the code https://gdl.space/

amber mist
#

ok i did it

#

there are 4 classes, first two are the monos (one is inhereted from other). And the other 3 are editor, (one inherited from other)

next vapor
#

You are not serialising your fields

amber mist
#

uh, ok right. Can I ask why the are not just serialized automatically like how floats are when you set it public.
OHHH its because they are private isn't it?

fringe aspen
#

Yes, only public field and private fields with the [SerializeField] attribute are serialized by Unity

amber mist
#

I feel like an idiot. Thank you

#

yup that worked

next vapor
#

I would still recommend using Undo over SetDirty

fringe aspen
#

Btw @amber mist for future reference in case you didn't already realize it.
It is against the #📖┃code-of-conduct to @ people not involved in the conversation. Also just in general in public discord servers it is normally considered a taboo/rude thing to do.
Just the heads up for next time 🙂

amber mist
#

Oh I didn't know that ok I am so sorry. But I did delete the @ when you responded. But yeah sorry

amber mist
amber mist
next vapor
#

The renderer needs to be dirtied separately, as with SetDirty not calling the renderer changes made to it will not persist

#

If you change an object through a method or property without dirtying it that change is transient

amber mist
next vapor
#

Undo is another method to dirty something

#

It's a general term

amber mist
#

got it

#

it worked

#

I see now. I understand how the undo works, it clicks in my head now thanks mate