My Awake() function calls OnValidate(); should I still remove it?
Is there a better way of doing this?
#if UNITY_EDITOR
private void Awake()
{
OnValidate();
}
#endif
My Awake() function calls OnValidate(); should I still remove it?
Is there a better way of doing this?
#if UNITY_EDITOR
private void Awake()
{
OnValidate();
}
#endif
No, in fact, we specifically need Awake() to call OnValidate in a built game to ensure that the dictionary is built (as OnValidate is not called in a built game.
Remove the #if UNITY_EDITOR/#endif tags on this and leave it in.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.