remove UNITY_EDITOR ifdef's

This commit is contained in:
2016-10-05 04:38:05 +07:00
parent 09d1de9d89
commit 58239afca9
2 changed files with 2 additions and 16 deletions

View File

@@ -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
}
}

View File

@@ -86,14 +86,12 @@ namespace FlashTools {
[HideInInspector]
public List<Sequence> Sequences;
#if UNITY_EDITOR
void Reset() {
Name = string.Empty;
Atlas = null;
FrameRate = 1.0f;
Sequences = new List<Sequence>();
}
#endif
}
// ---------------------------------------------------------------------