- Home /
Question by
_MGB_ · Jan 07, 2014 at 05:48 PM ·
inspectorcustom class
Inspector val init on non-mono class
I have some data for my object stored in a non-MonoBehaviour class so I can set it in the Inspector. I'd like to initialise a private member in that class to an inspector-set value before using it. When the class is constructed, the values are all default of course as they haven't been initialised with the instance values yet.
So... I'd like to know is there some kind of fn/callback I can hook into internally when the inspector has filled these values in?
Comment
Best Answer
Answer by _MGB_ · Jan 07, 2014 at 06:12 PM
It seems one approach is to derive from ScriptableObject and use the OnEnable() fn, which involves some other messing about with the class :(