Skip to content

Debug

Provides static logging methods that write to the Unity console. In Nori, prefer the built-in log(), warn(), and error() shortcut functions which are more concise and support string interpolation directly.

Methods

Assert

static Assert(condition: bool, message: object, context: UnityEngineObject) -> void
static Assert(condition: bool, message: object) -> void
static Assert(condition: bool, message: string, context: UnityEngineObject) -> void
static Assert(condition: bool, message: string) -> void
static Assert(condition: bool, context: UnityEngineObject) -> void
static Assert(condition: bool) -> void

AssertFormat

static AssertFormat(condition: bool, format: string, args: object[]) -> void
static AssertFormat(condition: bool, context: UnityEngineObject, format: string, args: object[]) -> void

DebugBreak

static DebugBreak() -> void

DrawLine

static DrawLine(start: Vector3, end: Vector3, color: Color, duration: float, depthTest: bool) -> void
static DrawLine(start: Vector3, end: Vector3, color: Color, duration: float) -> void
static DrawLine(start: Vector3, end: Vector3, color: Color) -> void
static DrawLine(start: Vector3, end: Vector3) -> void

DrawRay

static DrawRay(start: Vector3, dir: Vector3, color: Color, duration: float, depthTest: bool) -> void
static DrawRay(start: Vector3, dir: Vector3, color: Color, duration: float) -> void
static DrawRay(start: Vector3, dir: Vector3, color: Color) -> void
static DrawRay(start: Vector3, dir: Vector3) -> void

Equals

Equals(obj: object) -> bool

GetHashCode

GetHashCode() -> int

GetType

GetType() -> SystemType

Log

static Log(message: object, context: UnityEngineObject) -> void
static Log(message: object) -> void

Writes an informational message to the Unity console.

// Prefer: log("hello {name}")
Debug.Log("hello world")

LogAssertion

static LogAssertion(message: object, context: UnityEngineObject) -> void
static LogAssertion(message: object) -> void

LogAssertionFormat

static LogAssertionFormat(format: string, args: object[]) -> void
static LogAssertionFormat(context: UnityEngineObject, format: string, args: object[]) -> void

LogError

static LogError(message: object, context: UnityEngineObject) -> void
static LogError(message: object) -> void

Writes an error message (red) to the Unity console.

// Prefer: error("something broke")
Debug.LogError("something broke")

LogErrorFormat

static LogErrorFormat(format: string, args: object[]) -> void
static LogErrorFormat(context: UnityEngineObject, format: string, args: object[]) -> void

LogException

static LogException(exception: SystemException, context: UnityEngineObject) -> void
static LogException(exception: SystemException) -> void

LogFormat

static LogFormat(format: string, args: object[]) -> void
static LogFormat(logType: UnityEngineLogType, logOptions: UnityEngineLogOption, context: UnityEngineObject, format: string, args: object[]) -> void
static LogFormat(context: UnityEngineObject, format: string, args: object[]) -> void

LogWarning

static LogWarning(message: object, context: UnityEngineObject) -> void
static LogWarning(message: object) -> void

Writes a warning message (yellow) to the Unity console.

// Prefer: warn("low health")
Debug.LogWarning("low health")

LogWarningFormat

static LogWarningFormat(format: string, args: object[]) -> void
static LogWarningFormat(context: UnityEngineObject, format: string, args: object[]) -> void

new

static new() -> UnityEngineDebug

ToString

ToString() -> string