diff options
Diffstat (limited to 'AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs')
-rw-r--r-- | AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs b/AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs index 6f3923c..e427e20 100644 --- a/AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs +++ b/AlienSurvival/Assets/Test/Scripts/TestFakeHeight.cs @@ -1,7 +1,11 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif +[ExecuteInEditMode] public class TestFakeHeight : MonoBehaviour { [SerializeField] private Transform m_Shadow; @@ -98,4 +102,20 @@ public class TestFakeHeight : MonoBehaviour { Project(); } + +#if UNITY_EDITOR + + private void OnDrawGizmos() + { + // dash line + Vector3 start = transform.position; + Vector3 end = start - new Vector3(0, m_Height, 0); + + Handles.DrawDottedLine(start, end, 1f); + Handles.DrawWireCube(end, new Vector3(0.1f, 0.1f, 0f)); + + } + +#endif + } |