feat: remove ISerializationCallbackReceiver
parent
0aa89efdd1
commit
39c001f935
|
@ -7,7 +7,6 @@ using System.Runtime.CompilerServices;
|
||||||
using Coffee.UIParticleExtensions;
|
using Coffee.UIParticleExtensions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
using UnityEngine.Rendering;
|
||||||
using UnityEngine.Serialization;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("Coffee.UIParticle.Editor")]
|
[assembly: InternalsVisibleTo("Coffee.UIParticle.Editor")]
|
||||||
|
@ -21,9 +20,6 @@ namespace Coffee.UIExtensions
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[RequireComponent(typeof(CanvasRenderer))]
|
[RequireComponent(typeof(CanvasRenderer))]
|
||||||
public class UIParticle : MaskableGraphic
|
public class UIParticle : MaskableGraphic
|
||||||
#if UNITY_EDITOR
|
|
||||||
, ISerializationCallbackReceiver
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
[HideInInspector] [SerializeField] internal bool m_IsTrail = false;
|
[HideInInspector] [SerializeField] internal bool m_IsTrail = false;
|
||||||
|
|
||||||
|
@ -463,26 +459,6 @@ namespace Coffee.UIExtensions
|
||||||
maskable = m_Maskable;
|
maskable = m_Maskable;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
|
||||||
{
|
|
||||||
if (Application.isPlaying) return;
|
|
||||||
InitializeIfNeeded();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
|
||||||
{
|
|
||||||
if (m_Scale3D == Vector3.zero)
|
|
||||||
{
|
|
||||||
scale = m_Scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
UnityEditor.EditorApplication.delayCall += () =>
|
|
||||||
{
|
|
||||||
if (Application.isPlaying || !this) return;
|
|
||||||
InitializeIfNeeded();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue