Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.36k stars 350 forks source link

Using DOTweenEditorPreview.Start dirties the scene #398

Closed msfredb7 closed 4 years ago

msfredb7 commented 4 years ago

I'm using the DOTweenEditorPreview API to make a custom preview of some of my animations. Unfortunately, using DOTweenEditorPreview.Start creates a "-[DOTween Preview>]-" gameobject that dirties the scene. This means my artists can't use the custom preview without "modifying the scene". This is bad with version control.

The "-[DOTween Preview>]-" gameobject should be created with the HideFlags.HideAndDontSave flags so it doesn't dirty the scene. You can use EditorUtility.CreateGameObjectWithHideFlags(...) to do that.

Demigiant commented 4 years ago

Ahoy, the latest versions of DOTween don't create the DOTween Preview gameObject anymore for editor preview, but I still have to publish the downloadable version. In the meantime you can either get the latest from this repo (here) or use DOTweenEditorPreview.Stop when stopping the preview, which will clear the gameObject (and was the intended usage before this new non-gameObject version).