#Saving editor data

1 messages · Page 1 of 1 (latest)

junior rock
#

Do you mean it isn't saving in the Editor class or in the component?

fallow carbon
#

In the component

junior rock
#

The fields need to be serializable, and you either need to set them using SerializedProperty (strongly recommended), or call EditorUtility.SetDirty(target) after setting them.

celest quest
junior rock
#

I always forget that is there. Thanks

fallow carbon
#

For now it's as simple as this

[SerializeField] public List<Node> mapNodes { get; set; }```
#

It tweaked a few other things which apparently made it stop working but this line was the same before...

celest quest
#

properties are not serializable

fallow carbon
#

Automatic ones are

celest quest
#

No they are not

fallow carbon
#

Yes they are

#

I am using this thing for a while

#

And it's officially supported by Unity

celest quest
#

oh well, you can be wrong and not listen, that's okay

fallow carbon
celest quest
#

lol, oh look, not at all what you're doing

#

backing fields of properties

#

[field: SerializeField]

fallow carbon
#

Oh yeah

#

Doesn't get saved

celest quest
fallow carbon
#

Need to add field:

fallow carbon
celest quest
#

So, it wasn't working before, and as I said, properties are not serializable

#

instead you just ignored me, and rambled for a while saying it was working

fallow carbon
#

I added it only for debugging like 5 mins ago chill ok?

celest quest
#

👋

fallow carbon
#

Thanks