Builtin Library
README.md
session
Session-scoped key-value state. The store lives in the module's environment, which loads once per engine process, so values survive VM reloads (play flips, hot reloads) and die with the process. Use it for state whose lifetime must equal the session's runtime artifacts (GPU resources, runtime materials, bake outputs), which outlive a world save and would leave stale claims otherwise.
local Session = require("modules.session")
Session.set("my_system_" .. entityId, handle)
local handle = Session.get("my_system_" .. entityId)