diff options
Diffstat (limited to 'AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs')
-rw-r--r-- | AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs b/AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs index 88c32bb..1c541b9 100644 --- a/AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs +++ b/AlienSurvival/Assets/Scripts/TopDown/TopDownShadowCaster.cs @@ -2,7 +2,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -[ExecuteInEditMode, DisallowMultipleComponent] +//[ExecuteInEditMode] +[DisallowMultipleComponent] [RequireComponent(typeof(TopDownTransform))] [RequireComponent(typeof(SpriteRenderer))] public class TopDownShadowCaster : MonoBehaviour @@ -32,11 +33,7 @@ public class TopDownShadowCaster : MonoBehaviour GameObject child = this.transform.GetChild(i).gameObject; if (child.name == "shadow") { -#if UNITY_EDITOR - DestroyImmediate(child); -#else Destroy(child); -#endif } } |