public void EditorPlay() { if (!Application.isPlaying) { TweenManager.Ins.PreviewTweenerList.Add(Tweener); } else { if (Tweener == null) { TweenAnimation.CreateTweener(); } } TweenAnimation.SyncTweenerParams(); Tweener .SetPlayCallback(() => { EnableEditor = false; }) .SetStopCallback(() => { Tweener.SetStart(); EnableEditor = true; }) .Play(); EnableEditor = false; }
public void EditorApplyEdit() { if (EnableEditor) { if (Tweener != null) { TweenAnimation?.SyncTweenerParams(); } } EnableEditor = !EnableEditor; }