private void OnEnable() { _target = (GenericFader)target; _fadeTargets = serializedObject.FindProperty(nameof(_target.FadeTargets)); _unfadedColour = serializedObject.FindProperty(nameof(_target.UnfadedColour)); _fadedColour = serializedObject.FindProperty(nameof(_target.FadedColour)); _fadeCurve = serializedObject.FindProperty(nameof(_target.FadeCurve)); _unfadeCurve = serializedObject.FindProperty(nameof(_target.UnfadeCurve)); _onlyFade = serializedObject.FindProperty(nameof(_target.OnlyFade)); _fadeTime = serializedObject.FindProperty(nameof(_target.FadeTime)); _unfadeTime = serializedObject.FindProperty(nameof(_target.UnfadeTime)); _waitBetweenFades = serializedObject.FindProperty(nameof(_target.WaitBetweenFades)); _onFadeStart = serializedObject.FindProperty(nameof(_target.OnFadeStart)); _onFadeWait = serializedObject.FindProperty(nameof(_target.OnFadeWait)); _onFadeComplete = serializedObject.FindProperty(nameof(_target.OnFadeComplete)); }
private void OnEnable() { _target = (GenericFader)target; }