- Home /
Question by
MarekLg · Apr 28, 2020 at 02:36 PM ·
editoreditor-scriptingcallback
OnValidate() not called when stored ScriptableObject is called
I have the following structure:
public class A : MonoBehaviour
{
public Data data;
private void OnValidate()
{
// do something with data
}
}
public class Data : ScriptableObject
{
//some data
}
Is it expected, that A.OnValidate()
isn't called when a value in Data
changes?
If yes, is there another way that's more elegant than a System.Action
?
The Code is supposed to run in the Editor.
Thank you very much for your help!
Comment