mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-16 22:19:31 +07:00
remove UNITY_EDITOR ifdef's
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using FlashTools.Internal;
|
using FlashTools.Internal;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
using UnityEditor;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace FlashTools {
|
namespace FlashTools {
|
||||||
[ExecuteInEditMode, DisallowMultipleComponent]
|
[ExecuteInEditMode, DisallowMultipleComponent]
|
||||||
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
|
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
|
||||||
@@ -152,6 +148,7 @@ namespace FlashTools {
|
|||||||
_meshFilter .sharedMesh = null;
|
_meshFilter .sharedMesh = null;
|
||||||
_meshRenderer.sharedMaterials = new Material[0];
|
_meshRenderer.sharedMaterials = new Material[0];
|
||||||
}
|
}
|
||||||
|
_dirtyMesh = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,10 +213,10 @@ namespace FlashTools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ChangeCurrentFrame() {
|
void ChangeCurrentFrame() {
|
||||||
|
_dirtyMesh = true;
|
||||||
_currentFrame = frameCount > 0
|
_currentFrame = frameCount > 0
|
||||||
? Mathf.Clamp(currentFrame, 0, frameCount - 1)
|
? Mathf.Clamp(currentFrame, 0, frameCount - 1)
|
||||||
: 0;
|
: 0;
|
||||||
SetDirtyCurrentMesh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeSortingProperties() {
|
void ChangeSortingProperties() {
|
||||||
@@ -245,13 +242,6 @@ namespace FlashTools {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDirtyCurrentMesh() {
|
|
||||||
_dirtyMesh = true;
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
EditorUtility.SetDirty(this);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
SwfClipAsset.Frame GetCurrentBakedFrame() {
|
SwfClipAsset.Frame GetCurrentBakedFrame() {
|
||||||
var frames = _curSequence != null ? _curSequence.Frames : null;
|
var frames = _curSequence != null ? _curSequence.Frames : null;
|
||||||
return frames != null && currentFrame >= 0 && currentFrame < frames.Count
|
return frames != null && currentFrame >= 0 && currentFrame < frames.Count
|
||||||
@@ -283,7 +273,6 @@ namespace FlashTools {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
void Reset() {
|
void Reset() {
|
||||||
UpdateAllProperties();
|
UpdateAllProperties();
|
||||||
}
|
}
|
||||||
@@ -291,6 +280,5 @@ namespace FlashTools {
|
|||||||
void OnValidate() {
|
void OnValidate() {
|
||||||
UpdateAllProperties();
|
UpdateAllProperties();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,14 +86,12 @@ namespace FlashTools {
|
|||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public List<Sequence> Sequences;
|
public List<Sequence> Sequences;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
void Reset() {
|
void Reset() {
|
||||||
Name = string.Empty;
|
Name = string.Empty;
|
||||||
Atlas = null;
|
Atlas = null;
|
||||||
FrameRate = 1.0f;
|
FrameRate = 1.0f;
|
||||||
Sequences = new List<Sequence>();
|
Sequences = new List<Sequence>();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user