예제 #1
0
        /// <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;
            }
        }
예제 #2
0
 /// <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;
     }
 }