mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-15 04:25:27 +07:00
remove UNITY_EDITOR ifdef's
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user