using UnityEngine; using CSharpESP.Drawing; namespace CSharpESP.Renderers { public class Box2DRenderer { public enum BoxStyle { Full, Corner } public static void Render(Camera camera, Collider collider, Color color, BoxStyle style = BoxStyle.Full, float thickness = 1.5f) { if (collider == null) return; Render(camera, collider.bounds, color, style, thickness); } public static void Render(Camera camera, Bounds bounds, Color color, BoxStyle style = BoxStyle.Full, float thickness = 1.5f) { if (!MathUtils.GetScreenRectFromBounds(camera, bounds, out Rect screenRect)) { return; } if (style == BoxStyle.Corner) { RenderHelper.DrawCornerBox(screenRect, color, 10f, thickness); } else { RenderHelper.DrawBox(screenRect, color, thickness); } } } }