コード例 #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (!needsReset && GUILayout.Button("Play Tween"))
            {
                try
                {
                    Tween tween = TweenModule.GenerateTween();
                    //Tween tween = TweenModule.transform.DOMoveX(2, 1);

                    DOTweenEditorPreview.PrepareTweenForPreview(tween);
                    DOTweenEditorPreview.Start();
                    needsReset = true;
                }
                catch (Exception e)
                {
                    Debug.Log("Could not preview: " + e);
                }
            }
            if (needsReset && GUILayout.Button("Reset Tween"))
            {
                //TweenModule.Tween.Rewind();
                //TweenModule.Tween.Kill();
                DOTweenEditorPreview.Stop(true);
                needsReset = false;
            }
        }
コード例 #2
0
 void CompleteTween()
 {
     if (!EditorApplication.isPlaying)
     {
         DOTweenEditorPreview.Stop(true);
     }
     _tween = null;
 }
コード例 #3
0
 public static void StopButtonPreview(RectTransform rectTransform, CanvasGroup canvasGroup)
 {
     DOTweenEditorPreview.Stop(true);
     if (s_previewIsPlaying)
     {
         ResetButtonToStartValues(rectTransform, canvasGroup);
     }
     s_previewIsPlaying = false;
 }
コード例 #4
0
 public static void StopPopupPreview(UIPopup popup)
 {
     DOTweenEditorPreview.Stop(true);
     popup.ResetToStartValues();
     popup.Container.ResetToStartValues();
     if (popup.HasOverlay)
     {
         popup.Overlay.ResetToStartValues();
     }
     s_previewIsPlaying = false;
 }
コード例 #5
0
    public void StopAllAnimations()
    {
#if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            DOTweenEditorPreview.Stop();
        }
#endif
        animationBack?.Kill();
        animation?.Kill();
    }
コード例 #6
0
 private void ResetSimulatorTween(bool resetTweenTarget, bool resetProgress)
 {
     if (m_simulatorTween == null)
     {
         return;
     }
     m_simulatorTween.Kill(true);
     m_simulatorTween = null;
     if (resetProgress)
     {
         Target.SetProgress(0, true);
     }
     DOTweenEditorPreview.Stop();
     Target.OnValueUpdated();
 }
        private void StopPreview()
        {
            if (!Application.isPlaying)
            {
                EditorApplication.update -= EditorUpdate;
                DOTweenEditorPreview.Stop(true);
            }

            sequencerController.OnSequenceFinishedPlayingEvent -= StopPreview;
            for (int i = 0; i < activeSequencers.Length; i++)
            {
                AnimationSequencerController animationSequencerController = activeSequencers[i];
                if (animationSequencerController == null)
                {
                    continue;
                }

                animationSequencerController.Stop();
            }

            isPreviewPlaying = false;
            Repaint();
        }
コード例 #8
0
 public static void StopViewPreview(UIView view)
 {
     DOTweenEditorPreview.Stop(true);
     view.ResetToStartValues();
     s_previewIsPlaying = false;
 }
コード例 #9
0
        public static void StopTweens()
        {
#if UNITY_EDITOR
            DOTweenEditorPreview.Stop();
#endif
        }
コード例 #10
0
 static void Stop()
 {
     Debug.Log("EditorPreviewer ► Stop and reset");
     DOTweenEditorPreview.Stop(true);
 }
コード例 #11
0
 void CompleteTween()
 {
     DOTweenEditorPreview.Stop(true);
     _tween = null;
 }