/// <summary> /// Start editor preview /// </summary> public virtual void StartPreview() { if (mRunningInEditor) { StopPreview(); } if (!mRunningInEditor) { DTTime.InitializeEditorTime(); Target.BeginPreview(); EditorApplication.update -= editorUpdate; EditorApplication.update += editorUpdate; mRunningInEditor = true; } }
/// <summary> /// Start editor preview /// </summary> public virtual void StartPreview() { if (mRunningInEditor) { if (Target.IsPaused) { Target.Play(); } else { Target.Pause(); } } else { DTTime.InitializeEditorTime(); Target.BeginPreview(); EditorApplication.update -= editorUpdate; EditorApplication.update += editorUpdate; mRunningInEditor = true; } }