static void OnReset(DOTweenAnimation src) { DOTweenSettings settings = DOTweenUtilityWindow.GetDOTweenSettings(); if (settings == null) { return; } Undo.RecordObject(src, "DOTweenAnimation"); src.autoPlay = settings.defaultAutoPlay == AutoPlay.All || settings.defaultAutoPlay == AutoPlay.AutoPlayTweeners; src.autoKill = settings.defaultAutoKill; EditorUtility.SetDirty(src); }
void OnEnable() { _src = target as DOTweenAnimation; _settings = DOTweenUtilityWindow.GetDOTweenSettings(); onStartProperty = base.serializedObject.FindProperty("onStart"); onPlayProperty = base.serializedObject.FindProperty("onPlay"); onUpdateProperty = base.serializedObject.FindProperty("onUpdate"); onStepCompleteProperty = base.serializedObject.FindProperty("onStepComplete"); onCompleteProperty = base.serializedObject.FindProperty("onComplete"); onRewindProperty = base.serializedObject.FindProperty("onRewind"); onTweenCreatedProperty = base.serializedObject.FindProperty("onTweenCreated"); // Convert _AnimationType to _animationTypeNoSlashes int len = _AnimationType.Length; _animationTypeNoSlashes = new string[len]; for (int i = 0; i < len; ++i) { string a = _AnimationType[i]; a = a.Replace("/", ""); _animationTypeNoSlashes[i] = a; } }