Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMDebug Class Reference

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.
static void DebugLogClear ()
 Clears the debug log.
static void DebugLogInfo (object message, string color="", int timePrecision=3, bool displayFrameCount=true)
 Outputs an info message to the console.
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.
static DebugLogItem LogDebugToConsole (object message, string color, int timePrecision, bool displayFrameCount)
 Logs the specified message to the console.
static void SetDebugLogsEnabled (bool status)
 Enables or disables debug logs.
static void SetDebugDrawEnabled (bool status)
 Enables or disables debug draws.
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.
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.
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.
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.
static void DebugDrawCross (Vector3 spot, float crossSize, Color color)
 Draws a debug cross of the specified size and color at the specified point.
static void DrawHandlesBounds (Bounds bounds, Color color)
 Draws handles to materialize the bounds of an object on screen.
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.
static void DrawGizmoPoint (Vector3 position, float size, Color color)
 Draws a gizmo sphere of the specified size and color at a position.
static void DrawCube (Vector3 position, Color color, Vector3 size)
 Draws a cube at the specified position, and of the specified color and size.
static void DrawGizmoCube (Transform transform, Vector3 offset, Vector3 cubeSize, bool wireOnly)
 Draws a cube at the specified position, offset, and of the specified size.
static void DrawGizmoRectangle (Vector2 center, Vector2 size, Color color)
 Draws a gizmo rectangle.
static void DrawGizmoRectangle (Vector2 center, Vector2 size, Matrix4x4 rotationMatrix, Color color)
 Draws a gizmo rectangle.
static void DrawRectangle (Rect rectangle, Color color)
 Draws a rectangle based on a Rect and color.
static void DrawRectangle (Vector3 position, Color color, Vector3 size)
 Draws a rectangle of the specified color and size at the specified position.
static void DrawPoint (Vector3 position, Color color, float size)
 Draws a point of the specified color and size at the specified position.
static void DrawGizmoPoint (Vector3 position, Color color, float size)
 Draws a line of the specified color and size using gizmos.
static string GetSystemInfo ()
static void ClearConsole ()

Static Public Attributes

static List< DebugLogItemLogHistory = new List<DebugLogItem>(_logHistoryMaxLength)
 A list of all the debug logs (up to DebugLogMaxLength entries)

Properties

static MethodInfo[] Commands [get]
 Returns a list of all the debug command lines found in the project's assemblies.
static string LogHistoryText [get]
 Returns a string with all log history condensed.
static bool DebugLogsEnabled [get]
 whether or not debug logs (MMDebug.DebugLogTime, MMDebug.DebugOnScreen) should be displayed
static bool DebugDrawEnabled [get]
 whether or not debug draws should be executed

Detailed Description

Debug helpers.

Member Function Documentation

◆ ClearConsole()

void MoreMountains.Tools.MMDebug.ClearConsole ( )
static

◆ DebugDrawArrow() [1/2]

void MoreMountains.Tools.MMDebug.DebugDrawArrow ( Vector3 origin,
Vector3 direction,
Color color,
float arrowHeadLength = 0::2f,
float arrowHeadAngle = 35f )
static

Draws a debug arrow going from the origin position and along the direction Vector3.

Parameters
originOrigin.
directionDirection.
colorColor.

◆ DebugDrawArrow() [2/2]

void MoreMountains.Tools.MMDebug.DebugDrawArrow ( Vector3 origin,
Vector3 direction,
Color color,
float arrowLength,
float arrowHeadLength = 0::20f,
float arrowHeadAngle = 35::0f )
static

Draws a debug arrow going from the origin position and along the direction Vector3.

Parameters
originOrigin.
directionDirection.
colorColor.
arrowLengthArrow length.
arrowHeadLengthArrow head length.
arrowHeadAngleArrow head angle.

◆ DebugDrawCross()

void MoreMountains.Tools.MMDebug.DebugDrawCross ( Vector3 spot,
float crossSize,
Color color )
static

Draws a debug cross of the specified size and color at the specified point.

Parameters
spotSpot.
crossSizeCross size.
colorColor.

◆ DebugLogClear()

void MoreMountains.Tools.MMDebug.DebugLogClear ( )
static

Clears the debug log.

◆ DebugLogCommand()

void MoreMountains.Tools.MMDebug.DebugLogCommand ( string command)
static

Tries to input a command.

Parameters
command

◆ DebugLogInfo()

void MoreMountains.Tools.MMDebug.DebugLogInfo ( object message,
string color = "",
int timePrecision = 3,
bool displayFrameCount = true )
static

Outputs an info message to the console.

Parameters
message
color
timePrecision
displayFrameCount

◆ DebugLogTime()

void MoreMountains.Tools.MMDebug.DebugLogTime ( object message,
string color = "",
int timePrecision = 3,
bool displayFrameCount = true )
static

Outputs the message object to the console, prefixed with the current timestamp.

Parameters
messageMessage.

◆ DrawCube()

void MoreMountains.Tools.MMDebug.DrawCube ( Vector3 position,
Color color,
Vector3 size )
static

Draws a cube at the specified position, and of the specified color and size.

Parameters
positionPosition.
colorColor.
sizeSize.

◆ DrawGizmoArrow()

void MoreMountains.Tools.MMDebug.DrawGizmoArrow ( Vector3 origin,
Vector3 direction,
Color color,
float arrowHeadLength = 3f,
float arrowHeadAngle = 25f )
static

Draws a gizmo arrow going from the origin position and along the direction Vector3.

Parameters
originOrigin.
directionDirection.
colorColor.

◆ DrawGizmoCube()

void MoreMountains.Tools.MMDebug.DrawGizmoCube ( Transform transform,
Vector3 offset,
Vector3 cubeSize,
bool wireOnly )
static

Draws a cube at the specified position, offset, and of the specified size.

Parameters
transform
offset
cubeSize
wireOnly

◆ DrawGizmoPoint() [1/2]

void MoreMountains.Tools.MMDebug.DrawGizmoPoint ( Vector3 position,
Color color,
float size )
static

Draws a line of the specified color and size using gizmos.

Parameters
position
color
size

◆ DrawGizmoPoint() [2/2]

void MoreMountains.Tools.MMDebug.DrawGizmoPoint ( Vector3 position,
float size,
Color color )
static

Draws a gizmo sphere of the specified size and color at a position.

Parameters
positionPosition.
sizeSize.
colorColor.

◆ DrawGizmoRectangle() [1/2]

void MoreMountains.Tools.MMDebug.DrawGizmoRectangle ( Vector2 center,
Vector2 size,
Color color )
static

Draws a gizmo rectangle.

Parameters
centerCenter.
sizeSize.
colorColor.

◆ DrawGizmoRectangle() [2/2]

void MoreMountains.Tools.MMDebug.DrawGizmoRectangle ( Vector2 center,
Vector2 size,
Matrix4x4 rotationMatrix,
Color color )
static

Draws a gizmo rectangle.

Parameters
centerCenter.
sizeSize.
colorColor.

◆ DrawHandlesBounds()

void MoreMountains.Tools.MMDebug.DrawHandlesBounds ( Bounds bounds,
Color color )
static

Draws handles to materialize the bounds of an object on screen.

Parameters
boundsBounds.
colorColor.

◆ DrawPoint()

void MoreMountains.Tools.MMDebug.DrawPoint ( Vector3 position,
Color color,
float size )
static

Draws a point of the specified color and size at the specified position.

Parameters
posPosition.
colCol.
scaleScale.

◆ DrawRectangle() [1/2]

void MoreMountains.Tools.MMDebug.DrawRectangle ( Rect rectangle,
Color color )
static

Draws a rectangle based on a Rect and color.

Parameters
rectangleRectangle.
colorColor.

◆ DrawRectangle() [2/2]

void MoreMountains.Tools.MMDebug.DrawRectangle ( Vector3 position,
Color color,
Vector3 size )
static

Draws a rectangle of the specified color and size at the specified position.

Parameters
positionPosition.
colorColor.
sizeSize.

◆ DrawSolidRectangle()

void MoreMountains.Tools.MMDebug.DrawSolidRectangle ( Vector3 position,
Vector3 size,
Color borderColor,
Color solidColor )
static

Draws a solid rectangle at the specified position and size, and of the specified colors.

Parameters
position
size
borderColor
solidColor

◆ GetSystemInfo()

string MoreMountains.Tools.MMDebug.GetSystemInfo ( )
static

◆ LogDebugToConsole()

DebugLogItem MoreMountains.Tools.MMDebug.LogDebugToConsole ( object message,
string color,
int timePrecision,
bool displayFrameCount )
static

Logs the specified message to the console.

Parameters
message
color
timePrecision
displayFrameCount
Returns

◆ Raycast3D()

RaycastHit MoreMountains.Tools.MMDebug.Raycast3D ( Vector3 rayOriginPoint,
Vector3 rayDirection,
float rayDistance,
LayerMask mask,
Color color,
bool drawGizmo = false,
QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction::UseGlobal )
static

Draws a debug ray in 3D and does the actual raycast.

Returns
The raycast hit.
Parameters
rayOriginPointRay origin point.
rayDirectionRay direction.
rayDistanceRay distance.
maskMask.
debugIf set to true debug.
colorColor.
drawGizmoIf set to true draw gizmo.

◆ SetDebugDrawEnabled()

void MoreMountains.Tools.MMDebug.SetDebugDrawEnabled ( bool status)
static

Enables or disables debug draws.

Parameters
status

◆ SetDebugLogsEnabled()

void MoreMountains.Tools.MMDebug.SetDebugLogsEnabled ( bool status)
static

Enables or disables debug logs.

Parameters
status

Member Data Documentation

◆ LogHistory

List<DebugLogItem> MoreMountains.Tools.MMDebug.LogHistory = new List<DebugLogItem>(_logHistoryMaxLength)
static

A list of all the debug logs (up to DebugLogMaxLength entries)

Property Documentation

◆ Commands

MethodInfo [] MoreMountains.Tools.MMDebug.Commands
staticget

Returns a list of all the debug command lines found in the project's assemblies.

◆ DebugDrawEnabled

bool MoreMountains.Tools.MMDebug.DebugDrawEnabled
staticget

whether or not debug draws should be executed

◆ DebugLogsEnabled

bool MoreMountains.Tools.MMDebug.DebugLogsEnabled
staticget

whether or not debug logs (MMDebug.DebugLogTime, MMDebug.DebugOnScreen) should be displayed

◆ LogHistoryText

string MoreMountains.Tools.MMDebug.LogHistoryText
staticget

Returns a string with all log history condensed.


The documentation for this class was generated from the following file: