Hey guys,
I have a a bunch of class instances I’m serializing.
The class contains a few gameobjects variables that cant be serialized easily, so I marked them with NonSerialized.
When I deserialize I assign models to the gameobjects variables that I marked as NonSerialized.
I need the gameobject variables from the class instance to be displayed in the inspector and saved when I enter/exit play mode. However because NonSerialized also hides them
from the inspector it clears the fields when I enter or exit the game.
Any ideas on how to get around it?
Not even a clue?
– BitMaxThis can maybe help you but I don't think it's what you try to reach :/. http://answers.unity3d.com/questions/199691/nonserialized-vs-hideininspector-question.html Maybe you didn't undertand the meaning of each Properties (NonSerialized / HideInInspector / SerializedField ). At least if this can help you.
– lisztoThanks for your input liszto. Not being a programmer, I think its just my amateur approach that's to blame. The only solution I see at the moment is to create a new class and store the gameobjects there. If anyone has another solution I'd be glad to hear about it?
– BitMax