Table of Contents

Class Utilities

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

Fields

renderingActive

public static bool renderingActive

Field Value

bool

Properties

EditModeEnabled

public static bool EditModeEnabled { get; }

Property Value

bool

EngineFrameNo

public static int EngineFrameNo { get; }

Property Value

int

Methods

AddCommandLineFunction(string)

public static void AddCommandLineFunction(string concatName)

Parameters

concatName string

AddPerformanceReportToken(string, string, float)

public static void AddPerformanceReportToken(string performance_type, string name, float loading_time)

Parameters

performance_type string
name string
loading_time float

AddSceneObjectReport(string, string, float)

public static void AddSceneObjectReport(string scene_name, string report_name, float report_value)

Parameters

scene_name string
report_name string
report_value float

CheckIfAssetsAndSourcesAreSame()

public static void CheckIfAssetsAndSourcesAreSame()

CheckIfTerrainShaderHeaderGenerationFinished()

public static bool CheckIfTerrainShaderHeaderGenerationFinished()

Returns

bool

CheckResourceModifications()

public static void CheckResourceModifications()

CheckSceneForProblems(string)

public static void CheckSceneForProblems(string sceneName)

Parameters

sceneName string

CheckShaderCompilation()

public static bool CheckShaderCompilation()

Returns

bool

ClearDecalAtlas(DecalAtlasGroup)

public static void ClearDecalAtlas(DecalAtlasGroup atlasGroup)

Parameters

atlasGroup DecalAtlasGroup

ClearOldResourcesAndObjects()

public static void ClearOldResourcesAndObjects()

ClearShaderMemory()

public static void ClearShaderMemory()

CommandLineArgumentExists(string)

public static bool CommandLineArgumentExists(string str)

Parameters

str string

Returns

bool

CompileAllShaders(string)

public static void CompileAllShaders(string targetPlatform)

Parameters

targetPlatform string

CompileTerrainShadersDist(string, string, string)

public static void CompileTerrainShadersDist(string targetPlatform, string targetConfig, string output_path)

Parameters

targetPlatform string
targetConfig string
output_path string

ConstructMainThreadJob(Delegate, params object[])

public static void ConstructMainThreadJob(Delegate function, params object[] parameters)

Parameters

function Delegate
parameters object[]

ConstructMainThreadJob(Semaphore, Delegate, params object[])

public static void ConstructMainThreadJob(Semaphore semaphore, Delegate function, params object[] parameters)

Parameters

semaphore Semaphore
function Delegate
parameters object[]

CreateSelectionInEditor(List<GameEntity>, string)

public static void CreateSelectionInEditor(List<GameEntity> gameEntities, string name)

Parameters

gameEntities List<GameEntity>
name string

DebugSetGlobalLoadingWindowState(bool)

public static void DebugSetGlobalLoadingWindowState(bool newState)

Parameters

newState bool

DeleteEntitiesInEditorScene(List<GameEntity>)

public static void DeleteEntitiesInEditorScene(List<GameEntity> gameEntities)

Parameters

gameEntities List<GameEntity>

DetachWatchdog()

public static void DetachWatchdog()

DidAutomatedGIBakeFinished()

public static bool DidAutomatedGIBakeFinished()

Returns

bool

DisableCoreGame()

public static void DisableCoreGame()

DisableGlobalEditDataCacher()

public static void DisableGlobalEditDataCacher()

DisableGlobalLoadingWindow()

public static void DisableGlobalLoadingWindow()

DoDelayedexit(int)

public static void DoDelayedexit(int returnCode)

Parameters

returnCode int

DoFullBakeAllLevelsAutomated(string, string)

public static void DoFullBakeAllLevelsAutomated(string module, string scene)

Parameters

module string
scene string

DoFullBakeSingleLevelAutomated(string, string)

public static void DoFullBakeSingleLevelAutomated(string module, string scene)

Parameters

module string
scene string

DoLightOnlyBakeAllLevelsAutomated(string, string)

public static void DoLightOnlyBakeAllLevelsAutomated(string module, string scene)

Parameters

module string
scene string

DoLightOnlyBakeSingleLevelAutomated(string, string)

public static void DoLightOnlyBakeSingleLevelAutomated(string module, string scene)

Parameters

module string
scene string

DumpGPUMemoryStatistics(string)

public static void DumpGPUMemoryStatistics(string filePath)

Parameters

filePath string

EnableGlobalEditDataCacher()

public static void EnableGlobalEditDataCacher()

EnableGlobalLoadingWindow()

public static void EnableGlobalLoadingWindow()

EnableSingleGPUQueryPerFrame()

public static void EnableSingleGPUQueryPerFrame()

ExecuteCommandLineCommand(string)

public static string ExecuteCommandLineCommand(string command)

Parameters

command string

Returns

string

ExitProcess(int)

public static void ExitProcess(int exitCode)

Parameters

exitCode int

ExportNavMeshFaceMarks(string)

public static string ExportNavMeshFaceMarks(string file_name)

Parameters

file_name string

Returns

string

FindMeshesWithoutLods(string)

public static void FindMeshesWithoutLods(string module_name)

Parameters

module_name string

FlushManagedObjectsMemory()

public static void FlushManagedObjectsMemory()

GatherCoreGameReferences(string)

public static void GatherCoreGameReferences(string scene_names)

Parameters

scene_names string

GenerateTerrainShaderHeaders(string, string, string)

public static void GenerateTerrainShaderHeaders(string targetPlatform, string targetConfig, string output_path)

Parameters

targetPlatform string
targetConfig string
output_path string

GetApplicationMemory()

public static float GetApplicationMemory()

Returns

float

GetApplicationMemoryStatistics()

public static string GetApplicationMemoryStatistics()

Returns

string

GetApplicationName()

public static string GetApplicationName()

Returns

string

GetApplicationVersionWithBuildNumber()

public static ApplicationVersion GetApplicationVersionWithBuildNumber()

Returns

ApplicationVersion

GetAttachmentsPath()

public static string GetAttachmentsPath()

Returns

string

GetBasePath()

public static string GetBasePath()

Returns

string

GetBenchmarkStatus()

public static int GetBenchmarkStatus()

Returns

int

GetBuildNumber()

public static int GetBuildNumber()

Returns

int

GetConsoleHostMachine()

public static string GetConsoleHostMachine()

Returns

string

GetCoreGameState()

public static int GetCoreGameState()

Returns

int

GetCurrentCpuMemoryUsageMB()

public static ulong GetCurrentCpuMemoryUsageMB()

Returns

ulong

GetCurrentEstimatedGPUMemoryCostMB()

public static int GetCurrentEstimatedGPUMemoryCostMB()

Returns

int

GetCurrentProcessID()

public static uint GetCurrentProcessID()

Returns

uint

GetCurrentThreadId()

public static ulong GetCurrentThreadId()

Returns

ulong

GetDeltaTime(int)

public static float GetDeltaTime(int timerId)

Parameters

timerId int

Returns

float

GetDetailedGPUMemoryData(ref int, ref int, ref int)

public static void GetDetailedGPUMemoryData(ref int totalMemoryAllocated, ref int totalMemoryUsed, ref int emptyChunkTotalSize)

Parameters

totalMemoryAllocated int
totalMemoryUsed int
emptyChunkTotalSize int

GetDetailedXBOXMemoryInfo()

public static string GetDetailedXBOXMemoryInfo()

Returns

string

GetEntitiesOfSelectionSet(string, ref List<GameEntity>)

public static void GetEntitiesOfSelectionSet(string selectionSetName, ref List<GameEntity> gameEntities)

Parameters

selectionSetName string
gameEntities List<GameEntity>

GetExecutableWorkingDirectory()

public static string GetExecutableWorkingDirectory()

Returns

string

GetFps()

public static float GetFps()

Returns

float

GetFrameLimiterWithSleep()

public static bool GetFrameLimiterWithSleep()

Returns

bool

GetFullCommandLineString()

public static string GetFullCommandLineString()

Returns

string

GetFullFilePathOfScene(string)

public static string GetFullFilePathOfScene(string sceneName)

Parameters

sceneName string

Returns

string

GetFullModulePath(string)

public static string GetFullModulePath(string moduleName)

Parameters

moduleName string

Returns

string

GetFullModulePaths()

public static string[] GetFullModulePaths()

Returns

string[]

GetGPUMemoryMB()

public static int GetGPUMemoryMB()

Returns

int

GetGPUMemoryStats(ref float, ref float, ref float, ref float, ref float)

public static void GetGPUMemoryStats(ref float totalMemory, ref float renderTargetMemory, ref float depthTargetMemory, ref float srvMemory, ref float bufferMemory)

Parameters

totalMemory float
renderTargetMemory float
depthTargetMemory float
srvMemory float
bufferMemory float

GetGpuMemoryOfAllocationGroup(string)

public static ulong GetGpuMemoryOfAllocationGroup(string name)

Parameters

name string

Returns

ulong

GetLocalOutputPath()

public static string GetLocalOutputPath()

Returns

string

GetMainFps()

public static float GetMainFps()

Returns

float

GetMainThreadId()

public static ulong GetMainThreadId()

Returns

ulong

GetMemoryUsageOfCategory(int)

public static int GetMemoryUsageOfCategory(int category)

Parameters

category int

Returns

int

GetModulesNames()

public static string[] GetModulesNames()

Returns

string[]

GetNativeMemoryStatistics()

public static string GetNativeMemoryStatistics()

Returns

string

GetNumberOfShaderCompilationsInProgress()

public static int GetNumberOfShaderCompilationsInProgress()

Returns

int

GetPCInfo()

public static string GetPCInfo()

Returns

string

GetRendererFps()

public static float GetRendererFps()

Returns

float

GetReturnCode()

public static int GetReturnCode()

Returns

int

GetSelectedEntities(ref List<GameEntity>)

public static void GetSelectedEntities(ref List<GameEntity> gameEntities)

Parameters

gameEntities List<GameEntity>

GetSingleModuleScenesOfModule(string)

public static string[] GetSingleModuleScenesOfModule(string moduleName)

Parameters

moduleName string

Returns

string[]

GetSteamAppId()

public static int GetSteamAppId()

Returns

int

GetSystemLanguage()

public static string GetSystemLanguage()

Returns

string

GetVertexBufferChunkSystemMemoryUsage()

public static int GetVertexBufferChunkSystemMemoryUsage()

Returns

int

GetVisualTestsTestFilesPath()

public static string GetVisualTestsTestFilesPath()

Returns

string

GetVisualTestsValidatePath()

public static string GetVisualTestsValidatePath()

Returns

string

IsBenchmarkQuited()

public static bool IsBenchmarkQuited()

Returns

bool

IsDetailedSoundLogOn()

public static int IsDetailedSoundLogOn()

Returns

int

IsOnlyCoreContentEnabled()

public static bool IsOnlyCoreContentEnabled()

Returns

bool

IsSceneReportFinished()

public static bool IsSceneReportFinished()

Returns

bool

LoadBannerlordConfigFile()

public static string LoadBannerlordConfigFile()

Returns

string

LoadSkyBoxes()

public static void LoadSkyBoxes()

LoadVirtualTextureTileset(string)

public static void LoadVirtualTextureTileset(string name)

Parameters

name string

OnLoadingWindowDisabled()

public static void OnLoadingWindowDisabled()

OnLoadingWindowEnabled()

public static void OnLoadingWindowEnabled()

OpenOnscreenKeyboard(string, string, int, int)

public static void OpenOnscreenKeyboard(string initialText, string descriptionText, int maxLength, int keyboardTypeEnum)

Parameters

initialText string
descriptionText string
maxLength int
keyboardTypeEnum int

OutputBenchmarkValuesToPerformanceReporter()

public static void OutputBenchmarkValuesToPerformanceReporter()

OutputPerformanceReports()

public static void OutputPerformanceReports()

PairSceneNameToModuleName(string, string)

public static void PairSceneNameToModuleName(string sceneName, string moduleName)

Parameters

sceneName string
moduleName string

ParallelFor(int, int, long, int)

public static void ParallelFor(int startIndex, int endIndex, long curKey, int grainSize)

Parameters

startIndex int
endIndex int
curKey long
grainSize int

ParallelForWithDt(int, int, long, int)

public static void ParallelForWithDt(int startIndex, int endIndex, long curKey, int grainSize)

Parameters

startIndex int
endIndex int
curKey long
grainSize int

ProcessWindowTitle(string)

public static string ProcessWindowTitle(string title)

Parameters

title string

Returns

string

QuitGame()

public static void QuitGame()

RegisterGPUAllocationGroup(string)

public static int RegisterGPUAllocationGroup(string name)

Parameters

name string

Returns

int

RegisterMeshForGPUMorph(string)

public static void RegisterMeshForGPUMorph(string metaMeshName)

Parameters

metaMeshName string

RunJobs()

public static void RunJobs()

SaveConfigFile(string)

public static SaveResult SaveConfigFile(string configProperties)

Parameters

configProperties string

Returns

SaveResult

SaveDataAsTexture(string, int, int, float[])

public static int SaveDataAsTexture(string path, int width, int height, float[] data)

Parameters

path string
width int
height int
data float[]

Returns

int

SelectEntities(List<GameEntity>)

public static void SelectEntities(List<GameEntity> gameEntities)

Parameters

gameEntities List<GameEntity>

SetAllocationAlwaysValidScene(Scene)

public static void SetAllocationAlwaysValidScene(Scene scene)

Parameters

scene Scene

SetAssertionAtShaderCompile(bool)

public static void SetAssertionAtShaderCompile(bool value)

Parameters

value bool

SetAssertionsAndWarningsSetExitCode(bool)

public static void SetAssertionsAndWarningsSetExitCode(bool value)

Parameters

value bool

SetBenchmarkStatus(int, string)

public static void SetBenchmarkStatus(int status, string def)

Parameters

status int
def string

SetCoreGameState(int)

public static void SetCoreGameState(int state)

Parameters

state int

SetCrashOnAsserts(bool)

public static void SetCrashOnAsserts(bool val)

Parameters

val bool

SetCrashOnWarnings(bool)

public static void SetCrashOnWarnings(bool val)

Parameters

val bool

SetCrashReportCustomStack(string)

public static void SetCrashReportCustomStack(string customStack)

Parameters

customStack string

SetCrashReportCustomString(string)

public static void SetCrashReportCustomString(string customString)

Parameters

customString string

SetDisableDumpGeneration(bool)

public static void SetDisableDumpGeneration(bool value)

Parameters

value bool

SetDumpFolderPath(string)

public static void SetDumpFolderPath(string path)

Parameters

path string

SetFixedDt(bool, float)

public static void SetFixedDt(bool enabled, float dt)

Parameters

enabled bool
dt float

SetForceDrawEntityID(bool)

public static void SetForceDrawEntityID(bool value)

Parameters

value bool

SetForceVsync(bool)

public static void SetForceVsync(bool value)

Parameters

value bool

SetFrameLimiterWithSleep(bool)

public static void SetFrameLimiterWithSleep(bool value)

Parameters

value bool

SetGraphicsPreset(int)

public static void SetGraphicsPreset(int preset)

Parameters

preset int

SetLoadingScreenPercentage(float)

public static void SetLoadingScreenPercentage(float value)

Parameters

value float

SetMessageLineRenderingState(bool)

public static void SetMessageLineRenderingState(bool state)

Parameters

state bool

SetPrintCallstackAtCrahses(bool)

public static void SetPrintCallstackAtCrahses(bool value)

Parameters

value bool

SetRenderAgents(bool)

public static void SetRenderAgents(bool value)

Parameters

value bool

SetRenderMode(EngineRenderDisplayMode)

public static void SetRenderMode(Utilities.EngineRenderDisplayMode mode)

Parameters

mode Utilities.EngineRenderDisplayMode

SetReportMode(bool)

public static void SetReportMode(bool reportMode)

Parameters

reportMode bool

SetScreenTextRenderingState(bool)

public static void SetScreenTextRenderingState(bool state)

Parameters

state bool

SetWatchdogValue(string, string, string, string)

public static void SetWatchdogValue(string fileName, string groupName, string key, string value)

Parameters

fileName string
groupName string
key string
value string

SetWindowTitle(string)

public static void SetWindowTitle(string title)

Parameters

title string

StartScenePerformanceReport(string)

public static void StartScenePerformanceReport(string folderPath)

Parameters

folderPath string

TakeSSFromTop(string)

public static string TakeSSFromTop(string file_name)

Parameters

file_name string

Returns

string

TakeScreenshot(string)

public static void TakeScreenshot(string path)

Parameters

path string

TakeScreenshot(PlatformFilePath)

public static void TakeScreenshot(PlatformFilePath path)

Parameters

path PlatformFilePath

ToggleRender()

public static void ToggleRender()

TryGetFullFilePathOfScene(string, out string)

public static bool TryGetFullFilePathOfScene(string sceneName, out string fullPath)

Parameters

sceneName string
fullPath string

Returns

bool

TryGetUniqueIdentifiersForScene(string, out UniqueSceneId)

public static bool TryGetUniqueIdentifiersForScene(string sceneName, out UniqueSceneId identifiers)

Parameters

sceneName string
identifiers UniqueSceneId

Returns

bool

TryGetUniqueIdentifiersForSceneFile(string, out UniqueSceneId)

public static bool TryGetUniqueIdentifiersForSceneFile(string xsceneFilePath, out UniqueSceneId identifiers)

Parameters

xsceneFilePath string
identifiers UniqueSceneId

Returns

bool

WaitJobs()

public static void WaitJobs()

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