fix: (editor) sometimes crashes when entering play mode
If there are particle prefabs created using version 3.x in the project, there is a possibility that the editor may crash when entering Play Mode due to deserialization.pull/289/head
parent
6a1fef4150
commit
b80c3e6c9f
|
@ -378,7 +378,7 @@ namespace Coffee.UIExtensions
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
EditorApplication.delayCall += () =>
|
EditorApplication.delayCall += () =>
|
||||||
{
|
{
|
||||||
if (!this || !gameObject || !transform) return;
|
if (!this || !gameObject || !transform || Application.isPlaying) return;
|
||||||
transform.localScale = Vector3.one;
|
transform.localScale = Vector3.one;
|
||||||
m_ResetScaleOnEnable = false;
|
m_ResetScaleOnEnable = false;
|
||||||
EditorUtility.SetDirty(this);
|
EditorUtility.SetDirty(this);
|
||||||
|
|
Loading…
Reference in New Issue