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; } }
void CompleteTween() { if (!EditorApplication.isPlaying) { DOTweenEditorPreview.Stop(true); } _tween = null; }
public static void StopButtonPreview(RectTransform rectTransform, CanvasGroup canvasGroup) { DOTweenEditorPreview.Stop(true); if (s_previewIsPlaying) { ResetButtonToStartValues(rectTransform, canvasGroup); } s_previewIsPlaying = false; }
public static void StopPopupPreview(UIPopup popup) { DOTweenEditorPreview.Stop(true); popup.ResetToStartValues(); popup.Container.ResetToStartValues(); if (popup.HasOverlay) { popup.Overlay.ResetToStartValues(); } s_previewIsPlaying = false; }
public void StopAllAnimations() { #if UNITY_EDITOR if (!Application.isPlaying) { DOTweenEditorPreview.Stop(); } #endif animationBack?.Kill(); animation?.Kill(); }
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(); }
public static void StopViewPreview(UIView view) { DOTweenEditorPreview.Stop(true); view.ResetToStartValues(); s_previewIsPlaying = false; }
public static void StopTweens() { #if UNITY_EDITOR DOTweenEditorPreview.Stop(); #endif }
static void Stop() { Debug.Log("EditorPreviewer ► Stop and reset"); DOTweenEditorPreview.Stop(true); }
void CompleteTween() { DOTweenEditorPreview.Stop(true); _tween = null; }