static DOTweenSettings ConnectToSource(DOTweenSettings src, bool createIfMissing, bool fullSetup) { LocationData assetsLD = new LocationData(EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources"); LocationData dotweenLD = new LocationData(EditorUtils.dotweenDir + "Resources"); bool hasDemigiantDir = EditorUtils.demigiantDir != null; LocationData demigiantLD = hasDemigiantDir ? new LocationData(EditorUtils.demigiantDir + "Resources") : new LocationData(); if (src == null) { // Load eventual existing settings src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(assetsLD.adbFilePath, false); if (src == null) { src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(dotweenLD.adbFilePath, false); } if (src == null && hasDemigiantDir) { src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(demigiantLD.adbFilePath, false); } } if (src == null) { // Settings don't exist. if (!createIfMissing) { return(null); // Stop here } // Create it in external folder if (!Directory.Exists(assetsLD.dir)) { AssetDatabase.CreateFolder(assetsLD.adbParentDir, "Resources"); } src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(assetsLD.adbFilePath, true); } if (fullSetup) { // Move eventual settings from previous location and setup everything correctly DOTweenSettings.SettingsLocation settingsLoc = src.storeSettingsLocation; switch (settingsLoc) { case DOTweenSettings.SettingsLocation.AssetsDirectory: src = MoveSrc(new[] { dotweenLD, demigiantLD }, assetsLD); break; case DOTweenSettings.SettingsLocation.DOTweenDirectory: src = MoveSrc(new[] { assetsLD, demigiantLD }, dotweenLD); break; case DOTweenSettings.SettingsLocation.DemigiantDirectory: src = MoveSrc(new[] { assetsLD, dotweenLD }, demigiantLD); break; } } return(src); }
// =================================================================================== // METHODS --------------------------------------------------------------------------- void Connect(bool forceReconnect = false) { if (_src != null && !forceReconnect) { return; } LocationData assetsLD = new LocationData(EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources"); LocationData dotweenLD = new LocationData(EditorUtils.dotweenDir + "Resources"); bool hasDemigiantDir = EditorUtils.demigiantDir != null; LocationData demigiantLD = hasDemigiantDir ? new LocationData(EditorUtils.demigiantDir + "Resources") : new LocationData(); if (_src == null) { // Load eventual existing settings _src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(assetsLD.adbFilePath, false); if (_src == null) { _src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(dotweenLD.adbFilePath, false); } if (_src == null && hasDemigiantDir) { _src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(demigiantLD.adbFilePath, false); } } if (_src == null) { // Settings don't exist. Create it in external folder if (!Directory.Exists(assetsLD.dir)) { AssetDatabase.CreateFolder(assetsLD.adbParentDir, "Resources"); } _src = EditorUtils.ConnectToSourceAsset <DOTweenSettings>(assetsLD.adbFilePath, true); } // Move eventual settings from previous location and setup everything correctly DOTweenSettings.SettingsLocation settingsLoc = _src.storeSettingsLocation; switch (settingsLoc) { case DOTweenSettings.SettingsLocation.AssetsDirectory: MoveSrc(new[] { dotweenLD, demigiantLD }, assetsLD); break; case DOTweenSettings.SettingsLocation.DOTweenDirectory: MoveSrc(new[] { assetsLD, demigiantLD }, dotweenLD); break; case DOTweenSettings.SettingsLocation.DemigiantDirectory: MoveSrc(new[] { assetsLD, dotweenLD }, demigiantLD); break; } }
private void DrawPreferencesGUI() { GUILayout.Space(40f); if (GUILayout.Button("Reset", EditorGUIUtils.btStyle)) { this._src.useSafeMode = true; this._src.showUnityEditorReport = false; this._src.timeScale = 1f; this._src.useSmoothDeltaTime = false; this._src.logBehaviour = LogBehaviour.ErrorsOnly; this._src.drawGizmos = true; this._src.defaultRecyclable = false; this._src.defaultAutoPlay = AutoPlay.All; this._src.defaultUpdateType = UpdateType.Normal; this._src.defaultTimeScaleIndependent = false; this._src.defaultEaseType = Ease.OutQuad; this._src.defaultEaseOvershootOrAmplitude = 1.70158f; this._src.defaultEasePeriod = 0f; this._src.defaultAutoKill = true; this._src.defaultLoopType = LoopType.Restart; EditorUtility.SetDirty(this._src); } GUILayout.Space(8f); this._src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", this._src.useSafeMode); this._src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", this._src.timeScale); this._src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", this._src.useSmoothDeltaTime); this._src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", this._src.showUnityEditorReport); this._src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", (Enum)(object)this._src.logBehaviour); this._src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", this._src.drawGizmos); DOTweenSettings.SettingsLocation storeSettingsLocation = this._src.storeSettingsLocation; this._src.storeSettingsLocation = (DOTweenSettings.SettingsLocation)EditorGUILayout.Popup("Settings Location", (int)this._src.storeSettingsLocation, this._settingsLocation); if (this._src.storeSettingsLocation != storeSettingsLocation) { if (this._src.storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory && EditorUtils.demigiantDir == null) { EditorUtility.DisplayDialog("Change DOTween Settings Location", "Demigiant directory not present (must be the parent of DOTween's directory)", "Ok"); if (storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory) { this._src.storeSettingsLocation = DOTweenSettings.SettingsLocation.AssetsDirectory; this.Connect(true); } else { this._src.storeSettingsLocation = storeSettingsLocation; } } else { this.Connect(true); } } GUILayout.Space(8f); GUILayout.Label("DEFAULTS ▼"); this._src.defaultRecyclable = EditorGUILayout.Toggle("Recycle Tweens", this._src.defaultRecyclable); this._src.defaultAutoPlay = (AutoPlay)EditorGUILayout.EnumPopup("AutoPlay", (Enum)(object)this._src.defaultAutoPlay); this._src.defaultUpdateType = (UpdateType)EditorGUILayout.EnumPopup("Update Type", (Enum)(object)this._src.defaultUpdateType); this._src.defaultTimeScaleIndependent = EditorGUILayout.Toggle("TimeScale Independent", this._src.defaultTimeScaleIndependent); this._src.defaultEaseType = (Ease)EditorGUILayout.EnumPopup("Ease", (Enum)(object)this._src.defaultEaseType); this._src.defaultEaseOvershootOrAmplitude = EditorGUILayout.FloatField("Ease Overshoot", this._src.defaultEaseOvershootOrAmplitude); this._src.defaultEasePeriod = EditorGUILayout.FloatField("Ease Period", this._src.defaultEasePeriod); this._src.defaultAutoKill = EditorGUILayout.Toggle("AutoKill", this._src.defaultAutoKill); this._src.defaultLoopType = (LoopType)EditorGUILayout.EnumPopup("Loop Type", (Enum)(object)this._src.defaultLoopType); if (GUI.changed) { EditorUtility.SetDirty(this._src); } }
void DrawPreferencesGUI() { GUILayout.Space(40); if (GUILayout.Button("Reset", EditorGUIUtils.btBigStyle)) { // Reset to original defaults _src.useSafeMode = true; _src.safeModeOptions.nestedTweenFailureBehaviour = NestedTweenFailureBehaviour.TryToPreserveSequence; _src.showUnityEditorReport = false; _src.timeScale = 1; _src.useSmoothDeltaTime = false; _src.maxSmoothUnscaledTime = 0.15f; _src.rewindCallbackMode = RewindCallbackMode.FireIfPositionChanged; _src.logBehaviour = LogBehaviour.ErrorsOnly; _src.drawGizmos = true; _src.defaultRecyclable = false; _src.defaultAutoPlay = AutoPlay.All; _src.defaultUpdateType = UpdateType.Normal; _src.defaultTimeScaleIndependent = false; _src.defaultEaseType = Ease.OutQuad; _src.defaultEaseOvershootOrAmplitude = 1.70158f; _src.defaultEasePeriod = 0; _src.defaultAutoKill = true; _src.defaultLoopType = LoopType.Restart; _src.debugMode = false; _src.debugStoreTargetId = false; EditorUtility.SetDirty(_src); } GUILayout.Space(8); _src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", _src.useSafeMode); if (_src.useSafeMode) { _src.safeModeOptions.nestedTweenFailureBehaviour = (NestedTweenFailureBehaviour)EditorGUILayout.EnumPopup( new GUIContent("└ On Nested Tween Failure", "Behaviour in case a tween inside a Sequence fails"), _src.safeModeOptions.nestedTweenFailureBehaviour ); } _src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", _src.timeScale); _src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", _src.useSmoothDeltaTime); _src.maxSmoothUnscaledTime = EditorGUILayout.Slider("Max SmoothUnscaledTime", _src.maxSmoothUnscaledTime, 0.01f, 1f); _src.rewindCallbackMode = (RewindCallbackMode)EditorGUILayout.EnumPopup("OnRewind Callback Mode", _src.rewindCallbackMode); GUILayout.Space(-5); GUILayout.BeginHorizontal(); GUILayout.Space(EditorGUIUtility.labelWidth + 4); EditorGUILayout.HelpBox( _src.rewindCallbackMode == RewindCallbackMode.FireIfPositionChanged ? "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will be fired only if the tween isn't already rewinded" : _src.rewindCallbackMode == RewindCallbackMode.FireAlwaysWithRewind ? "When calling Rewind, OnRewind callbacks will always be fired, even if the tween is already rewinded." : "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will always be fired, even if the tween is already rewinded", MessageType.None ); GUILayout.EndHorizontal(); _src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", _src.showUnityEditorReport); _src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour); _src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", _src.drawGizmos); DOTweenSettings.SettingsLocation prevSettingsLocation = _src.storeSettingsLocation; _src.storeSettingsLocation = (DOTweenSettings.SettingsLocation)EditorGUILayout.Popup("Settings Location", (int)_src.storeSettingsLocation, _settingsLocation); if (_src.storeSettingsLocation != prevSettingsLocation) { if (_src.storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory && EditorUtils.demigiantDir == null) { EditorUtility.DisplayDialog("Change DOTween Settings Location", "Demigiant directory not present (must be the parent of DOTween's directory)", "Ok"); if (prevSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory) { _src.storeSettingsLocation = DOTweenSettings.SettingsLocation.AssetsDirectory; Connect(true); } else { _src.storeSettingsLocation = prevSettingsLocation; } } else { Connect(true); } } GUILayout.Space(8); GUILayout.Label("DEFAULTS ▼"); _src.defaultRecyclable = EditorGUILayout.Toggle("Recycle Tweens", _src.defaultRecyclable); _src.defaultAutoPlay = (AutoPlay)EditorGUILayout.EnumPopup("AutoPlay", _src.defaultAutoPlay); _src.defaultUpdateType = (UpdateType)EditorGUILayout.EnumPopup("Update Type", _src.defaultUpdateType); _src.defaultTimeScaleIndependent = EditorGUILayout.Toggle("TimeScale Independent", _src.defaultTimeScaleIndependent); _src.defaultEaseType = (Ease)EditorGUILayout.EnumPopup("Ease", _src.defaultEaseType); _src.defaultEaseOvershootOrAmplitude = EditorGUILayout.FloatField("Ease Overshoot", _src.defaultEaseOvershootOrAmplitude); _src.defaultEasePeriod = EditorGUILayout.FloatField("Ease Period", _src.defaultEasePeriod); _src.defaultAutoKill = EditorGUILayout.Toggle("AutoKill", _src.defaultAutoKill); _src.defaultLoopType = (LoopType)EditorGUILayout.EnumPopup("Loop Type", _src.defaultLoopType); GUILayout.Space(8); _src.debugMode = EditorGUIUtils.ToggleButton(_src.debugMode, new GUIContent("DEBUG MODE", "Turns debug mode options on/off"), true); if (_src.debugMode) { GUILayout.BeginVertical(GUI.skin.box); EditorGUI.BeginDisabledGroup(!_src.useSafeMode && _src.logBehaviour != LogBehaviour.ErrorsOnly); _src.debugStoreTargetId = EditorGUILayout.Toggle("Store GameObject's ID", _src.debugStoreTargetId); GUILayout.Label( "<b>Requires Safe Mode to be active + Default or Verbose LogBehaviour:</b>" + " when using DO shortcuts stores the relative gameObject's name so it can be returned along the warning logs" + " (helps with a clearer identification of the warning's target)", EditorGUIUtils.wordWrapRichTextLabelStyle ); EditorGUI.EndDisabledGroup(); GUILayout.EndVertical(); } }
private void DrawPreferencesGUI() { GUILayout.Space(40f); if (GUILayout.Button("Reset", EditorGUIUtils.btBigStyle, new GUILayoutOption[0])) { this._src.useSafeMode = true; this._src.safeModeOptions.nestedTweenFailureBehaviour = NestedTweenFailureBehaviour.TryToPreserveSequence; this._src.showUnityEditorReport = false; this._src.timeScale = 1f; this._src.useSmoothDeltaTime = false; this._src.maxSmoothUnscaledTime = 0.15f; this._src.rewindCallbackMode = RewindCallbackMode.FireIfPositionChanged; this._src.logBehaviour = LogBehaviour.ErrorsOnly; this._src.drawGizmos = true; this._src.defaultRecyclable = false; this._src.defaultAutoPlay = AutoPlay.All; this._src.defaultUpdateType = UpdateType.Normal; this._src.defaultTimeScaleIndependent = false; this._src.defaultEaseType = Ease.OutQuad; this._src.defaultEaseOvershootOrAmplitude = 1.70158f; this._src.defaultEasePeriod = 0.0f; this._src.defaultAutoKill = true; this._src.defaultLoopType = LoopType.Restart; EditorUtility.SetDirty((UnityEngine.Object) this._src); } GUILayout.Space(8f); this._src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", this._src.useSafeMode, new GUILayoutOption[0]); if (this._src.useSafeMode) { this._src.safeModeOptions.nestedTweenFailureBehaviour = (NestedTweenFailureBehaviour)EditorGUILayout.EnumPopup(new GUIContent("└ On Nested Tween Failure", "Behaviour in case a tween inside a Sequence fails"), (Enum)this._src.safeModeOptions.nestedTweenFailureBehaviour, new GUILayoutOption[0]); } this._src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", this._src.timeScale, new GUILayoutOption[0]); this._src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", this._src.useSmoothDeltaTime, new GUILayoutOption[0]); this._src.maxSmoothUnscaledTime = EditorGUILayout.Slider("Max SmoothUnscaledTime", this._src.maxSmoothUnscaledTime, 0.01f, 1f, new GUILayoutOption[0]); this._src.rewindCallbackMode = (RewindCallbackMode)EditorGUILayout.EnumPopup("OnRewind Callback Mode", (Enum)this._src.rewindCallbackMode, new GUILayoutOption[0]); GUILayout.Space(-5f); GUILayout.BeginHorizontal(); GUILayout.Space(EditorGUIUtility.labelWidth + 4f); EditorGUILayout.HelpBox(this._src.rewindCallbackMode == RewindCallbackMode.FireIfPositionChanged ? "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will be fired only if the tween isn't already rewinded" : (this._src.rewindCallbackMode == RewindCallbackMode.FireAlwaysWithRewind ? "When calling Rewind, OnRewind callbacks will always be fired, even if the tween is already rewinded." : "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will always be fired, even if the tween is already rewinded"), MessageType.None); GUILayout.EndHorizontal(); this._src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", this._src.showUnityEditorReport, new GUILayoutOption[0]); this._src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", (Enum)this._src.logBehaviour, new GUILayoutOption[0]); this._src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", this._src.drawGizmos, new GUILayoutOption[0]); DOTweenSettings.SettingsLocation settingsLocation = this._src.storeSettingsLocation; this._src.storeSettingsLocation = (DOTweenSettings.SettingsLocation)EditorGUILayout.Popup("Settings Location", (int)this._src.storeSettingsLocation, this._settingsLocation, new GUILayoutOption[0]); if (this._src.storeSettingsLocation != settingsLocation) { if (this._src.storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory && EditorUtils.demigiantDir == null) { EditorUtility.DisplayDialog("Change DOTween Settings Location", "Demigiant directory not present (must be the parent of DOTween's directory)", "Ok"); if (settingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory) { this._src.storeSettingsLocation = DOTweenSettings.SettingsLocation.AssetsDirectory; this.Connect(true); } else { this._src.storeSettingsLocation = settingsLocation; } } else { this.Connect(true); } } GUILayout.Space(8f); GUILayout.Label("DEFAULTS ▼"); this._src.defaultRecyclable = EditorGUILayout.Toggle("Recycle Tweens", this._src.defaultRecyclable, new GUILayoutOption[0]); this._src.defaultAutoPlay = (AutoPlay)EditorGUILayout.EnumPopup("AutoPlay", (Enum)this._src.defaultAutoPlay, new GUILayoutOption[0]); this._src.defaultUpdateType = (UpdateType)EditorGUILayout.EnumPopup("Update Type", (Enum)this._src.defaultUpdateType, new GUILayoutOption[0]); this._src.defaultTimeScaleIndependent = EditorGUILayout.Toggle("TimeScale Independent", this._src.defaultTimeScaleIndependent, new GUILayoutOption[0]); this._src.defaultEaseType = (Ease)EditorGUILayout.EnumPopup("Ease", (Enum)this._src.defaultEaseType, new GUILayoutOption[0]); this._src.defaultEaseOvershootOrAmplitude = EditorGUILayout.FloatField("Ease Overshoot", this._src.defaultEaseOvershootOrAmplitude, new GUILayoutOption[0]); this._src.defaultEasePeriod = EditorGUILayout.FloatField("Ease Period", this._src.defaultEasePeriod, new GUILayoutOption[0]); this._src.defaultAutoKill = EditorGUILayout.Toggle("AutoKill", this._src.defaultAutoKill, new GUILayoutOption[0]); this._src.defaultLoopType = (LoopType)EditorGUILayout.EnumPopup("Loop Type", (Enum)this._src.defaultLoopType, new GUILayoutOption[0]); }
void DrawPreferencesGUI() { GUILayout.Space(40); if (GUILayout.Button("Reset", EditorGUIUtils.btBigStyle)) { // Reset to original defaults _src.useSafeMode = true; _src.showUnityEditorReport = false; _src.timeScale = 1; _src.useSmoothDeltaTime = false; _src.maxSmoothUnscaledTime = 0.15f; _src.rewindCallbackMode = RewindCallbackMode.FireIfPositionChanged; _src.logBehaviour = LogBehaviour.ErrorsOnly; _src.drawGizmos = true; _src.defaultRecyclable = false; _src.defaultAutoPlay = AutoPlay.All; _src.defaultUpdateType = UpdateType.Normal; _src.defaultTimeScaleIndependent = false; _src.defaultEaseType = Ease.OutQuad; _src.defaultEaseOvershootOrAmplitude = 1.70158f; _src.defaultEasePeriod = 0; _src.defaultAutoKill = true; _src.defaultLoopType = LoopType.Restart; EditorUtility.SetDirty(_src); } GUILayout.Space(8); _src.useSafeMode = EditorGUILayout.Toggle("Safe Mode", _src.useSafeMode); _src.timeScale = EditorGUILayout.FloatField("DOTween's TimeScale", _src.timeScale); _src.useSmoothDeltaTime = EditorGUILayout.Toggle("Smooth DeltaTime", _src.useSmoothDeltaTime); _src.maxSmoothUnscaledTime = EditorGUILayout.Slider("Max SmoothUnscaledTime", _src.maxSmoothUnscaledTime, 0.01f, 1f); _src.rewindCallbackMode = (RewindCallbackMode)EditorGUILayout.EnumPopup("OnRewind Callback Mode", _src.rewindCallbackMode); GUILayout.Space(-5); GUILayout.BeginHorizontal(); GUILayout.Space(154); EditorGUILayout.HelpBox( _src.rewindCallbackMode == RewindCallbackMode.FireIfPositionChanged ? "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will be fired only if the tween isn't already rewinded" : _src.rewindCallbackMode == RewindCallbackMode.FireAlwaysWithRewind ? "When calling Rewind, OnRewind callbacks will always be fired, even if the tween is already rewinded." : "When calling Rewind or PlayBackwards/SmoothRewind, OnRewind callbacks will always be fired, even if the tween is already rewinded", MessageType.None ); GUILayout.EndHorizontal(); _src.showUnityEditorReport = EditorGUILayout.Toggle("Editor Report", _src.showUnityEditorReport); _src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour); _src.drawGizmos = EditorGUILayout.Toggle("Draw Path Gizmos", _src.drawGizmos); DOTweenSettings.SettingsLocation prevSettingsLocation = _src.storeSettingsLocation; _src.storeSettingsLocation = (DOTweenSettings.SettingsLocation)EditorGUILayout.Popup("Settings Location", (int)_src.storeSettingsLocation, _settingsLocation); if (_src.storeSettingsLocation != prevSettingsLocation) { if (_src.storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory && EditorUtils.demigiantDir == null) { EditorUtility.DisplayDialog("Change DOTween Settings Location", "Demigiant directory not present (must be the parent of DOTween's directory)", "Ok"); if (prevSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory) { _src.storeSettingsLocation = DOTweenSettings.SettingsLocation.AssetsDirectory; Connect(true); } else { _src.storeSettingsLocation = prevSettingsLocation; } } else { Connect(true); } } GUILayout.Space(8); GUILayout.Label("DEFAULTS ▼"); _src.defaultRecyclable = EditorGUILayout.Toggle("Recycle Tweens", _src.defaultRecyclable); _src.defaultAutoPlay = (AutoPlay)EditorGUILayout.EnumPopup("AutoPlay", _src.defaultAutoPlay); _src.defaultUpdateType = (UpdateType)EditorGUILayout.EnumPopup("Update Type", _src.defaultUpdateType); _src.defaultTimeScaleIndependent = EditorGUILayout.Toggle("TimeScale Independent", _src.defaultTimeScaleIndependent); _src.defaultEaseType = (Ease)EditorGUILayout.EnumPopup("Ease", _src.defaultEaseType); _src.defaultEaseOvershootOrAmplitude = EditorGUILayout.FloatField("Ease Overshoot", _src.defaultEaseOvershootOrAmplitude); _src.defaultEasePeriod = EditorGUILayout.FloatField("Ease Period", _src.defaultEasePeriod); _src.defaultAutoKill = EditorGUILayout.Toggle("AutoKill", _src.defaultAutoKill); _src.defaultLoopType = (LoopType)EditorGUILayout.EnumPopup("Loop Type", _src.defaultLoopType); }