Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using DG.DOTweenEditor;
- using DG.Tweening;
- static class EditorTweenManager
- {
- public void PlayEditorTween(Transform sampleTarget)
- {
- // Create tween as usual
- Tween t = sampleTarget.DOMoveX(2, 1);
- // Prepare the tween for editor preview
- DOTweenEditorPreview.PrepareTweenForPreview(t);
- // Start the editor tweens update loop
- // (will update any tween you passed to PrepareTweenForPreview)
- DOTweenEditorPreview.Start();
- }
- public void StopEditorTweens()
- {
- // Stop all editor tweens
- // (you can pass a TRUE parameter to also reset the tween targets to their original state)
- DOTweenEditorPreview.Stop();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement