C# Класс RedBlueGames.Tools.DebugUtility

Contains utilities and "Extension methods" to the Debug class, specifically for Drawing
Показать файл Открыть проект

Открытые методы

Метод Описание
DrawArrow ( Vector2 origin, Vector2 endpoint, Color color, float duration = 0.01f ) : void

Draws an arrow using Debug.Draw

DrawBox ( Vector2 worldTopLeft, Vector2 worldBottomRight, Color color, float duration = 0.01f ) : void

Draws a box using Debug.Draw functions

DrawCircle ( Vector2 center, float radius, Color color, float numSegments = 40, float duration = 0.01f ) : void

Draws a Circle using Debug.Draw functions

DrawEdges ( Vector2 worldPoints, Color color, float duration = 0.01f ) : void

Draws an array of edges, where an edge is defined by two Vector2 points, using Debug.Draw

DrawPolygon ( Vector2 worldPoints, Color color, float duration = 0.01f ) : void

Draws a polygon, defined by all verteces of the polygon, using Debug.Draw

Приватные методы

Метод Описание
DebugDrawArrowhead ( Vector2 origin, Vector2 direction, float size, Color color, float duration = 0.01f, float theta = 30.0f ) : void
GetArrowSizeForLine ( Vector2 line ) : float

Описание методов

DrawArrow() публичный статический Метод

Draws an arrow using Debug.Draw
public static DrawArrow ( Vector2 origin, Vector2 endpoint, Color color, float duration = 0.01f ) : void
origin UnityEngine.Vector2 Origin point in world space.
endpoint UnityEngine.Vector2 Endpoint in world space.
color UnityEngine.Color Color for Debug.Draw.
duration float Duration to show the arrow.
Результат void

DrawBox() публичный статический Метод

Draws a box using Debug.Draw functions
public static DrawBox ( Vector2 worldTopLeft, Vector2 worldBottomRight, Color color, float duration = 0.01f ) : void
worldTopLeft UnityEngine.Vector2 World top left corner.
worldBottomRight UnityEngine.Vector2 World bottom right corner.
color UnityEngine.Color Color for Debug.Draw.
duration float Duration to show the box.
Результат void

DrawCircle() публичный статический Метод

Draws a Circle using Debug.Draw functions
public static DrawCircle ( Vector2 center, float radius, Color color, float numSegments = 40, float duration = 0.01f ) : void
center UnityEngine.Vector2 Center point.
radius float Radius of the circle.
color UnityEngine.Color Color for Debug.Draw.
numSegments float Number of segments for the circle, used for precision of the draw.
duration float Duration to show the circle.
Результат void

DrawEdges() публичный статический Метод

Draws an array of edges, where an edge is defined by two Vector2 points, using Debug.Draw
public static DrawEdges ( Vector2 worldPoints, Color color, float duration = 0.01f ) : void
worldPoints UnityEngine.Vector2 World points, defining each vertex of an edge in world space.
color UnityEngine.Color Color for Debug.Draw.
duration float Duration to show the edges.
Результат void

DrawPolygon() публичный статический Метод

Draws a polygon, defined by all verteces of the polygon, using Debug.Draw
public static DrawPolygon ( Vector2 worldPoints, Color color, float duration = 0.01f ) : void
worldPoints UnityEngine.Vector2 World points, defining each vertex of the polygon in world space.
color UnityEngine.Color Color for Debug.Draw.
duration float Duration to show the polygon.
Результат void