diff --git a/Assets/FlashTools/Scripts/SwfClip.cs b/Assets/FlashTools/Scripts/SwfClip.cs index 357369a..d899e8c 100644 --- a/Assets/FlashTools/Scripts/SwfClip.cs +++ b/Assets/FlashTools/Scripts/SwfClip.cs @@ -1,10 +1,6 @@ using UnityEngine; using FlashTools.Internal; -#if UNITY_EDITOR -using UnityEditor; -#endif - namespace FlashTools { [ExecuteInEditMode, DisallowMultipleComponent] [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] @@ -152,6 +148,7 @@ namespace FlashTools { _meshFilter .sharedMesh = null; _meshRenderer.sharedMaterials = new Material[0]; } + _dirtyMesh = false; } } @@ -216,10 +213,10 @@ namespace FlashTools { } void ChangeCurrentFrame() { + _dirtyMesh = true; _currentFrame = frameCount > 0 ? Mathf.Clamp(currentFrame, 0, frameCount - 1) : 0; - SetDirtyCurrentMesh(); } void ChangeSortingProperties() { @@ -245,13 +242,6 @@ namespace FlashTools { } } - void SetDirtyCurrentMesh() { - _dirtyMesh = true; - #if UNITY_EDITOR - EditorUtility.SetDirty(this); - #endif - } - SwfClipAsset.Frame GetCurrentBakedFrame() { var frames = _curSequence != null ? _curSequence.Frames : null; return frames != null && currentFrame >= 0 && currentFrame < frames.Count @@ -283,7 +273,6 @@ namespace FlashTools { } } - #if UNITY_EDITOR void Reset() { UpdateAllProperties(); } @@ -291,6 +280,5 @@ namespace FlashTools { void OnValidate() { UpdateAllProperties(); } - #endif } } \ No newline at end of file diff --git a/Assets/FlashTools/Scripts/SwfClipAsset.cs b/Assets/FlashTools/Scripts/SwfClipAsset.cs index 811ffc8..2fe6540 100644 --- a/Assets/FlashTools/Scripts/SwfClipAsset.cs +++ b/Assets/FlashTools/Scripts/SwfClipAsset.cs @@ -86,14 +86,12 @@ namespace FlashTools { [HideInInspector] public List Sequences; - #if UNITY_EDITOR void Reset() { Name = string.Empty; Atlas = null; FrameRate = 1.0f; Sequences = new List(); } - #endif } // ---------------------------------------------------------------------