private void OnValidate() { // Execute color update if settings are changed in the editor if (GUI.changed && _colorVariable != null) { OnColorChanged(_colorVariable.Get()); } }
void Start() { ___selectable = GetComponent <Selectable>(); if (_colorVariable == null) { throw new Exception("Color preset missing."); } OnColorChanged(_colorVariable.Get()); }