RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

cdefDebugDraw ReferencecdefGpuMesh ReferencecdefImgui ReferencecdefMath Referencecdefs ReferencecontrolSystems Referencecsvlib ReferencedelayLine Referencedequeue ReferencedevUtils ReferenceEvent Referenceextensions Referencefilters Referencegraphpath Referenceguihooks ReferenceinputFilters ReferenceinterpolatedMap Referenceintrospection ReferencejbeamWriter Referencejson-ast Referencejson ReferencejsonDebug ReferencejsonPrettyEncoderCustom Referencekdtreebox2d Referencekdtreebox3d Referencekdtreepoint3d Referencelpack ReferenceluaBinding ReferenceluaCore ReferenceluaProfiler Referencemathlib Referenceparticles Referencequadtree Referencesettings ReferencetcpServer ReferencetimeEvents Referenceutils Reference
extensions/ - BeamNG Extension Modules
ui/imgui_api Referenceui/imgui_custom_luaintf Referenceui/imgui_gen_luaintf Referenceui/imgui Referenceui/imguiUtils Referenceui/imguiWire Referenceui/improfiler Reference

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referencecommonextensionsui

ui/imgui Reference

Module defined in `lua/common/extensions/ui/imgui.lua`. ImGui context manager - initializes and maintains the Lua-side ImGui context linked to the C++ engine context.

Module defined in lua/common/extensions/ui/imgui.lua. ImGui context manager - initializes and maintains the Lua-side ImGui context linked to the C++ engine context.


Exports

Functions

M.onImGuiReady()

Hook: Called when ImGui is first ready. Initializes the Lua ImGui context.

M.onExtensionLoaded()

Hook: Re-initializes context on dynamic extension reload.

Variables

M.ctx

  • Type: userdata (ImGui context)
  • Description: The main C++ ImGui context obtained from Engine.imgui.GetMainContext()

M.flags

  • Type: function
  • Description: Alias to bit.bor for combining ImGui flags

M.setEnabled

  • Type: function
  • Description: Function to enable/disable ImGui rendering

Hooks

  • onImGuiReady
  • onExtensionLoaded

Internal Notes

  • initContext() gets the C++ context and wires it to Lua
  • Context must be re-acquired on extension reload
  • This module is the foundation that other ImGui modules depend on

ui/imgui_gen_luaintf Reference

Module defined in `lua/common/extensions/ui/imgui_gen_luaintf.lua`. **Auto-generated** Lua-to-ImGui function bindings. DO NOT EDIT - generated by `tools/imguiUtilities/gen_luaintf.py`.

ui/imguiUtils Reference

Module defined in `lua/common/extensions/ui/imguiUtils.lua`. Higher-level ImGui widget utilities - dropdowns, key-value tables, recursive tree displays, texture objects, and sampled float displays.

On this page

ExportsFunctionsM.onImGuiReady()M.onExtensionLoaded()VariablesM.ctxM.flagsM.setEnabledHooksInternal Notes