Question by
evelivan · Dec 14, 2018 at 04:54 PM ·
playserializable
MonoBehaviour field Null in Playmode
I guess there's something about the concepts of Edit/Play mode that I don't quite understand..
I have a GameObject with a script. The script defines some fields with class types from some external C# library (without Serializable Interface). I assign object references to those fields via a custom editor script, but when I hit Play, those fields are null again. So my question is, what exactly is happening to my GameObject when I hit play and how can I retain all its fields? Do I have to fork that library I'm using and add Serializable to every class I plan on using in Unity?
Comment