Skip to content
Berke edited this page Jun 23, 2026 · 1 revision

Debug

The Debug table provides logging and editor output utilities for Lua scripts. These functions are mainly used for debugging gameplay logic and printing runtime information.


Functions

Print

Debug.Print(...)

Prints a formatted message to the engine/editor console.


Parameters

Name Type Description
... any Variadic arguments (converted to string)

Returns

nil

Example

Debug.Print("Player position:", entity.transform.position)

Logging Functions

All logging functions accept variadic arguments and internally convert them into a single string.


LogInfo

Debug.LogInfo(...)

Logs an informational message.

Example

Debug.LogInfo("Game started", true)

LogWarning

Debug.LogWarning(...)

Logs a warning message.

Example

Debug.LogWarning("Low health:", hp)

LogError

Debug.LogError(...)

Logs an error message.

Example

Debug.LogError("Failed to load level:", levelName)

LogCritical

Debug.LogCritical(...)

Logs a critical error message.

Example

Debug.LogCritical("Renderer crashed!")

Notes

  • All arguments are converted using a safe string serializer.
  • Unsupported types are represented as:
<object>
  • Output goes through spdlog and engine editor console which is inside Logs/ (if you are on Windows that is C:\Users\x\Documents\Tilky Engine\Logs\engine_logt.txt)
  • These functions are intended for debugging only, not gameplay logic.

Clone this wiki locally