Inventory Engine
v4.0
|
Debug helpers More...
Classes | |
struct | DebugLogItem |
A struct used to store log items More... | |
struct | MMDebugLogEvent |
An event used to broadcast debug logs More... | |
Static Public Member Functions | |
static void | DebugLogCommand (string command) |
Tries to input a command More... | |
static void | DebugLogClear () |
Clears the debug log More... | |
static void | DebugLogInfo (object message, string color="", int timePrecision=3, bool displayFrameCount=true) |
Outputs an info message to the console More... | |
static void | DebugLogTime (object message, string color="", int timePrecision=3, bool displayFrameCount=true) |
Outputs the message object to the console, prefixed with the current timestamp More... | |
static DebugLogItem | LogDebugToConsole (object message, string color, int timePrecision, bool displayFrameCount) |
Logs the specified message to the console More... | |
static void | SetDebugLogsEnabled (bool status) |
Enables or disables debug logs More... | |
static void | SetDebugDrawEnabled (bool status) |
Enables or disables debug draws More... | |
static RaycastHit2D | RayCast (Vector2 rayOriginPoint, Vector2 rayDirection, float rayDistance, LayerMask mask, Color color, bool drawGizmo=false) |
Draws a debug ray in 2D and does the actual raycast More... | |
static RaycastHit2D | BoxCast (Vector2 origin, Vector2 size, float angle, Vector2 direction, float length, LayerMask mask, Color color, bool drawGizmo=false) |
Does a boxcast and draws a box gizmo More... | |
static RaycastHit2D | MonoRayCastNonAlloc (RaycastHit2D[] array, Vector2 rayOriginPoint, Vector2 rayDirection, float rayDistance, LayerMask mask, Color color, bool drawGizmo=false) |
Draws a debug ray without allocating memory More... | |
static RaycastHit | Raycast3D (Vector3 rayOriginPoint, Vector3 rayDirection, float rayDistance, LayerMask mask, Color color, bool drawGizmo=false, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Draws a debug ray in 3D and does the actual raycast More... | |
static void | DrawGizmoArrow (Vector3 origin, Vector3 direction, Color color, float arrowHeadLength=3f, float arrowHeadAngle=25f) |
Draws a gizmo arrow going from the origin position and along the direction Vector3 More... | |
static void | DebugDrawArrow (Vector3 origin, Vector3 direction, Color color, float arrowHeadLength=0.2f, float arrowHeadAngle=35f) |
Draws a debug arrow going from the origin position and along the direction Vector3 More... | |
static void | DebugDrawArrow (Vector3 origin, Vector3 direction, Color color, float arrowLength, float arrowHeadLength=0.20f, float arrowHeadAngle=35.0f) |
Draws a debug arrow going from the origin position and along the direction Vector3 More... | |
static void | DebugDrawCross (Vector3 spot, float crossSize, Color color) |
Draws a debug cross of the specified size and color at the specified point More... | |
static void | DrawHandlesBounds (Bounds bounds, Color color) |
Draws handles to materialize the bounds of an object on screen. More... | |
static void | DrawSolidRectangle (Vector3 position, Vector3 size, Color borderColor, Color solidColor) |
Draws a solid rectangle at the specified position and size, and of the specified colors More... | |
static void | DrawGizmoPoint (Vector3 position, float size, Color color) |
Draws a gizmo sphere of the specified size and color at a position More... | |
static void | DrawCube (Vector3 position, Color color, Vector3 size) |
Draws a cube at the specified position, and of the specified color and size More... | |
static void | DrawGizmoCube (Transform transform, Vector3 offset, Vector3 cubeSize, bool wireOnly) |
Draws a cube at the specified position, offset, and of the specified size More... | |
static void | DrawGizmoRectangle (Vector2 center, Vector2 size, Color color) |
Draws a gizmo rectangle More... | |
static void | DrawGizmoRectangle (Vector2 center, Vector2 size, Matrix4x4 rotationMatrix, Color color) |
Draws a gizmo rectangle More... | |
static void | DrawRectangle (Rect rectangle, Color color) |
Draws a rectangle based on a Rect and color More... | |
static void | DrawRectangle (Vector3 position, Color color, Vector3 size) |
Draws a rectangle of the specified color and size at the specified position More... | |
static void | DrawPoint (Vector3 position, Color color, float size) |
Draws a point of the specified color and size at the specified position More... | |
static void | DrawGizmoPoint (Vector3 position, Color color, float size) |
Draws a line of the specified color and size using gizmos More... | |
static string | GetSystemInfo () |
static void | ClearConsole () |
Static Public Attributes | |
static List< DebugLogItem > | LogHistory = new List<DebugLogItem>(_logHistoryMaxLength) |
A list of all the debug logs (up to DebugLogMaxLength entries) More... | |
Properties | |
static MethodInfo[] | Commands [get] |
Returns a list of all the debug command lines found in the project's assemblies More... | |
static string | LogHistoryText [get] |
Returns a string with all log history condensed More... | |
static bool? | DebugLogsEnabled [get] |
whether or not debug logs (MMDebug.DebugLogTime, MMDebug.DebugOnScreen) should be displayed More... | |
static bool | DebugDrawEnabled [get] |
whether or not debug draws should be executed More... | |
Debug helpers
|
static |
Does a boxcast and draws a box gizmo
origin | |
size | |
angle | |
direction | |
length | |
mask | |
color | |
drawGizmo |
|
static |
|
static |
Draws a debug arrow going from the origin position and along the direction Vector3
origin | Origin. |
direction | Direction. |
color | Color. |
|
static |
Draws a debug arrow going from the origin position and along the direction Vector3
origin | Origin. |
direction | Direction. |
color | Color. |
arrowLength | Arrow length. |
arrowHeadLength | Arrow head length. |
arrowHeadAngle | Arrow head angle. |
|
static |
Draws a debug cross of the specified size and color at the specified point
spot | Spot. |
crossSize | Cross size. |
color | Color. |
|
static |
Clears the debug log
|
static |
Tries to input a command
command |
|
static |
Outputs an info message to the console
message | |
color | |
timePrecision | |
displayFrameCount |
|
static |
Outputs the message object to the console, prefixed with the current timestamp
message | Message. |
|
static |
Draws a cube at the specified position, and of the specified color and size
position | Position. |
color | Color. |
size | Size. |
|
static |
Draws a gizmo arrow going from the origin position and along the direction Vector3
origin | Origin. |
direction | Direction. |
color | Color. |
|
static |
Draws a cube at the specified position, offset, and of the specified size
transform | |
offset | |
cubeSize | |
wireOnly |
|
static |
Draws a line of the specified color and size using gizmos
position | |
color | |
size |
|
static |
Draws a gizmo sphere of the specified size and color at a position
position | Position. |
size | Size. |
color | Color. |
|
static |
Draws a gizmo rectangle
center | Center. |
size | Size. |
color | Color. |
|
static |
Draws a gizmo rectangle
center | Center. |
size | Size. |
color | Color. |
|
static |
Draws handles to materialize the bounds of an object on screen.
bounds | Bounds. |
color | Color. |
|
static |
Draws a point of the specified color and size at the specified position
pos | Position. |
col | Col. |
scale | Scale. |
|
static |
Draws a rectangle based on a Rect and color
rectangle | Rectangle. |
color | Color. |
|
static |
Draws a rectangle of the specified color and size at the specified position
position | Position. |
color | Color. |
size | Size. |
|
static |
Draws a solid rectangle at the specified position and size, and of the specified colors
position | |
size | |
borderColor | |
solidColor |
|
static |
|
static |
Logs the specified message to the console
message | |
color | |
timePrecision | |
displayFrameCount |
|
static |
Draws a debug ray without allocating memory
array | Array. |
rayOriginPoint | Ray origin point. |
rayDirection | Ray direction. |
rayDistance | Ray distance. |
mask | Mask. |
color | Color. |
drawGizmo | If set to true draw gizmo. |
|
static |
Draws a debug ray in 2D and does the actual raycast
rayOriginPoint | Ray origin point. |
rayDirection | Ray direction. |
rayDistance | Ray distance. |
mask | Mask. |
debug | If set to true debug. |
color | Color. |
|
static |
Draws a debug ray in 3D and does the actual raycast
rayOriginPoint | Ray origin point. |
rayDirection | Ray direction. |
rayDistance | Ray distance. |
mask | Mask. |
debug | If set to true debug. |
color | Color. |
drawGizmo | If set to true draw gizmo. |
|
static |
Enables or disables debug draws
status |
|
static |
Enables or disables debug logs
status |
|
static |
A list of all the debug logs (up to DebugLogMaxLength entries)
|
staticget |
Returns a list of all the debug command lines found in the project's assemblies
|
staticget |
whether or not debug draws should be executed
|
staticget |
whether or not debug logs (MMDebug.DebugLogTime, MMDebug.DebugOnScreen) should be displayed
|
staticget |
Returns a string with all log history condensed