Skip to content
Elias Wennerberg edited this page Oct 4, 2026 · 1 revision

API (UniTerminal)

Everything you call from game code lives on the static UniTerminal class.

Registry

  • DiscoverCommandsInAssembly(assembly) — register commands from mods/DLC loaded after startup. See Mods.
  • LoadCommandCache() — load manually; only needed if loadCacheOnAwake is off.
  • Commands — read-only view of all registered commands, keyed by lowercase name.
  • OnCacheLoaded(ms) — fires once the cache is ready, with load time in milliseconds.

Invoking

  • ExecuteCommand("coins 500") — run a command string as if typed.
  • Log(message) / Log(message, success) / Log(message, color) — write to the console.
  • CheatsEnabled — gate for CommandFlags.Cheat commands.
  • RegisterArgConverter<T>(s => …) — teach the parser a custom parameter type. See Commands.

Suggestions

  • RegisterSuggestions<T>(ctx => …) — autocomplete for every parameter of type T.
  • RegisterSuggestions("give", "item", ctx => …) — autocomplete for one parameter.
  • UnregisterSuggestions<T>() / UnregisterSuggestions(command, param) — remove them again.
  • See Autocomplete for the full story.

UI

  • ShowTerminalUI(show) / ToggleTerminalUI() / IsTerminalUIVisible — open, close, toggle, check.
  • SetLogFilter(logs, warnings, errors) — severity filtering from code.
  • OnConsoleToggled(open) — reacts to the console opening or closing.

Types

  • CommandResponseDelegate(message, success = true) — the preferred response callback. See Commands.
  • AutoCompleteContext (Prefix, ArgIndex, ParamName, TypedArgs) — what suggestion providers receive. See Autocomplete.

Clone this wiki locally