private static void OnEditorUpdate() { //only work when Application is not playing. if (Application.isPlaying) { return; } var deltaTime = UnityEditor.EditorApplication.timeSinceStartup - _lastEditorUpdateTime; _lastEditorUpdateTime = UnityEditor.EditorApplication.timeSinceStartup; var data = new TweenTicker.TickData((float)deltaTime, Time.timeScale); TweenTicker.Tick(data); }
private void Update() { var data = new TweenTicker.TickData(Time.unscaledDeltaTime, Time.timeScale); TweenTicker.Tick(data); }