Table of Contents

Class MBDebug

Namespace
TaleWorlds.Engine
Assembly
TaleWorlds.Engine.dll
public static class MBDebug
Inheritance
MBDebug
Inherited Members

Fields

DisableAllUI

public static bool DisableAllUI

Field Value

bool

DisableLogging

public static bool DisableLogging

Field Value

bool

IsDisplayingHighLevelAI

public static bool IsDisplayingHighLevelAI

Field Value

bool

ShouldAssertThrowException

public static bool ShouldAssertThrowException

Field Value

bool

TestModeEnabled

public static bool TestModeEnabled

Field Value

bool

Properties

DebugVector

public static Vec3 DebugVector { get; }

Property Value

Vec3

ShowDebugInfoState

public static int ShowDebugInfoState { get; set; }

Property Value

int

Methods

AbortGame(int)

public static void AbortGame(int ExitCode = 5)

Parameters

ExitCode int

Assert(bool, string, string, string, int)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void Assert(bool condition, string message, string callerFile = "", string callerMethod = "", int callerLine = 0)

Parameters

condition bool
message string
callerFile string
callerMethod string
callerLine int

AssertConditionOrCallerClassName(bool, string)

[Conditional("DEBUG_MORE")]
public static void AssertConditionOrCallerClassName(bool condition, string name)

Parameters

condition bool
name string

AssertConditionOrCallerClassNameSearchAllCallstack(bool, string)

[Conditional("DEBUG_MORE")]
public static void AssertConditionOrCallerClassNameSearchAllCallstack(bool condition, string name)

Parameters

condition bool
name string

AssertMemoryUsage(int)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void AssertMemoryUsage(int memoryMB)

Parameters

memoryMB int

ClearConsole(List<string>)

[CommandLineFunctionality.CommandLineArgumentFunction("clear", "console")]
public static string ClearConsole(List<string> strings)

Parameters

strings List<string>

Returns

string

ClearRenderObjects()

[Conditional("_RGL_KEEP_ASSERTS")]
public static void ClearRenderObjects()

ConditionalContentWarning(bool, string)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void ConditionalContentWarning(bool condition, string message)

Parameters

condition bool
message string

ConsolePrint(string, DebugColor, ulong)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void ConsolePrint(string message, Debug.DebugColor color = DebugColor.White, ulong debugFilter = 17592186044416)

Parameters

message string
color Debug.DebugColor
debugFilter ulong

ContentWarning(string)

public static void ContentWarning(string message)

Parameters

message string

DisableUI(List<string>)

[CommandLineFunctionality.CommandLineArgumentFunction("toggle_ui", "ui")]
public static string DisableUI(List<string> strings)

Parameters

strings List<string>

Returns

string

EchoCommandWindow(List<string>)

[CommandLineFunctionality.CommandLineArgumentFunction("echo_command_window", "console")]
public static string EchoCommandWindow(List<string> strings)

Parameters

strings List<string>

Returns

string

EchoCommandWindow(string)

public static void EchoCommandWindow(string content)

Parameters

content string

EchoCommandWindowTest(List<string>)

[CommandLineFunctionality.CommandLineArgumentFunction("echo_command_window_test", "console")]
public static string EchoCommandWindowTest(List<string> strings)

Parameters

strings List<string>

Returns

string

FailedAssert(string, string, string, int)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void FailedAssert(string message, string callerFile = "", string callerMethod = "", int callerLine = 0)

Parameters

message string
callerFile string
callerMethod string
callerLine int

IsErrorReportModeActive()

public static bool IsErrorReportModeActive()

Returns

bool

IsErrorReportModePauseMission()

public static bool IsErrorReportModePauseMission()

Returns

bool

IsTestMode()

public static bool IsTestMode()

Returns

bool

PostWarningLine(string)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void PostWarningLine(string line)

Parameters

line string

Print(string, int, DebugColor, ulong)

public static void Print(string message, int logLevel = 0, Debug.DebugColor color = DebugColor.White, ulong debugFilter = 17592186044416)

Parameters

message string
logLevel int
color Debug.DebugColor
debugFilter ulong

RenderDebugBoxObject(Vec3, Vec3, uint, bool, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugBoxObject(Vec3 min, Vec3 max, uint color = 4294967295, bool depthCheck = false, float time = 0)

Parameters

min Vec3
max Vec3
color uint
depthCheck bool
time float

RenderDebugBoxObject(Vec3, Vec3, MatrixFrame, uint, bool, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugBoxObject(Vec3 min, Vec3 max, MatrixFrame frame, uint color = 4294967295, bool depthCheck = false, float time = 0)

Parameters

min Vec3
max Vec3
frame MatrixFrame
color uint
depthCheck bool
time float

RenderDebugCapsule(Vec3, Vec3, float, uint, bool, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugCapsule(Vec3 p0, Vec3 p1, float radius, uint color = 4294967295, bool depthCheck = false, float time = 0)

Parameters

p0 Vec3
p1 Vec3
radius float
color uint
depthCheck bool
time float

RenderDebugDirectionArrow(Vec3, Vec3, uint, bool)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugDirectionArrow(Vec3 position, Vec3 direction, uint color = 4294967295, bool depthCheck = false)

Parameters

position Vec3
direction Vec3
color uint
depthCheck bool

RenderDebugFrame(MatrixFrame, float, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugFrame(MatrixFrame frame, float lineLength, float time = 0)

Parameters

frame MatrixFrame
lineLength float
time float

RenderDebugLine(Vec3, Vec3, uint, bool, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugLine(Vec3 position, Vec3 direction, uint color = 4294967295, bool depthCheck = false, float time = 0)

Parameters

position Vec3
direction Vec3
color uint
depthCheck bool
time float

RenderDebugRect(float, float, float, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugRect(float left, float bottom, float right, float top)

Parameters

left float
bottom float
right float
top float

RenderDebugRectWithColor(float, float, float, float, uint)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugRectWithColor(float left, float bottom, float right, float top, uint color = 4294967295)

Parameters

left float
bottom float
right float
top float
color uint

RenderDebugSphere(Vec3, float, uint, bool, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugSphere(Vec3 position, float radius, uint color = 4294967295, bool depthCheck = false, float time = 0)

Parameters

position Vec3
radius float
color uint
depthCheck bool
time float

RenderDebugText(float, float, string, uint, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugText(float screenX, float screenY, string text, uint color = 4294967295, float time = 0)

Parameters

screenX float
screenY float
text string
color uint
time float

RenderDebugText3D(Vec3, string, uint, int, int, float)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void RenderDebugText3D(Vec3 worldPosition, string str, uint color = 4294967295, int screenPosOffsetX = 0, int screenPosOffsetY = 0, float time = 0)

Parameters

worldPosition Vec3
str string
color uint
screenPosOffsetX int
screenPosOffsetY int
time float

RenderText(float, float, string, uint, float)

public static void RenderText(float screenX, float screenY, string text, uint color = 4294967295, float time = 0)

Parameters

screenX float
screenY float
text string
color uint
time float

SetDumpGenerationDisabled(bool)

public static void SetDumpGenerationDisabled(bool value)

Parameters

value bool

SetErrorReportScene(Scene)

public static void SetErrorReportScene(Scene scene)

Parameters

scene Scene

ShowError(string)

public static void ShowError(string message)

Parameters

message string

ShowMessageBox(string, string, uint)

public static void ShowMessageBox(string lpText, string lpCaption, uint uType)

Parameters

lpText string
lpCaption string
uType uint

ShowWarning(string)

public static void ShowWarning(string message)

Parameters

message string

SilentAssert(bool, string, bool, string, string, int)

public static void SilentAssert(bool condition, string message = "", bool getDump = false, string callerFile = "", string callerMethod = "", int callerLine = 0)

Parameters

condition bool
message string
getDump bool
callerFile string
callerMethod string
callerLine int

WriteDebugLineOnScreen(string)

[Conditional("_RGL_KEEP_ASSERTS")]
public static void WriteDebugLineOnScreen(string str)

Parameters

str string

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).