private void OnDrawGizmos() { #if UNITY_EDITOR if (Box2DBounds == null) { Box2DBounds = (CollisionFactory.Box2DBounds)CollisionFactory.GetNewBoundsInstance(CollisionFactory.ECollisionShape.BOX); } if (!Application.isPlaying) { UpdateHitboxBounds(); } Color ColorWithTransparency = DebugDrawColor; ColorWithTransparency.a = .2f; UnityEditor.Handles.DrawSolidRectangleWithOutline(Box2DBounds.GetVerticies(), ColorWithTransparency, DebugDrawColor); #endif }
/// <summary> /// /// </summary> /// <param name="BoxBounds"></param> /// <param name="ColorToDraw"></param> private void DrawBoxColliderBounds(CollisionFactory.Box2DBounds BoxBounds, Color ColorToDraw) { UnityEditor.Handles.color = ColorToDraw; UnityEditor.Handles.DrawAAPolyLine(BoxBounds.GetVerticies()); }