Skip to content

Commit 86de8b6

Browse files
authored
Merge pull request #289 from wmltogether/fix-deserialize-crash
Fix Editor sometimes crashes when entering Play Mode
2 parents 6a1fef4 + b80c3e6 commit 86de8b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/UIParticle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void ISerializationCallbackReceiver.OnAfterDeserialize()
378378
#if UNITY_EDITOR
379379
EditorApplication.delayCall += () =>
380380
{
381-
if (!this || !gameObject || !transform) return;
381+
if (!this || !gameObject || !transform || Application.isPlaying) return;
382382
transform.localScale = Vector3.one;
383383
m_ResetScaleOnEnable = false;
384384
EditorUtility.SetDirty(this);

0 commit comments

Comments
 (0)