REPL Mode
REPL Mode is Scriptum’s interactive scripting mode.
It stands for Read–Eval–Print–Loop, and that’s exactly what it does.
You type a line of code, it gets evaluated on the spot, and the result is printed immediately.
No recompiling. No waiting. Just fast, live iteration inside the Unity Editor.
Instantly test logic, invoke methods, manipulate objects, and analyze behavior without recompiling or pausing the game.
What Is REPL Good For?
- Testing expressions and quick logic
- Debugging values and object states
- Calling methods on live objects
- Experimenting with new ideas without modifying scripts
- Using built-in commands and Live Variables interactively
- Exploring your scene and data while it's running
Whether you're tweaking values, spawning objects, or just poking around — REPL gives you full control with zero friction.
How It Works
Every line you enter gets compiled and executed in a live scripting context.
The REPL console shows the result immediately, including:
- Return value or result (with type)
- Any thrown exceptions or errors
- Output from
echo()
orDebug.Log()
- Visual structure for complex types like lists or GameObjects
It behaves like a mini C# shell — but integrated into Unity and deeply aware of your scene and runtime data.
Syntax and Features
You don’t need to wrap code in classes or methods. Just type:
1 + 2
@player.transform.position
Time.time > 10
@player.transform.position
Debug.Log("Hello from Scriptum")
You can also define temp variables:
It supports:
- Autocomplete and IntelliSense
- Output error feedback
- Live Variable injection (
@player
,@mainCamera
, etc.) - Command history (
↑
to cycle) - Built-in commands like
bind()
,clear()
,alert()
, etc.
Built-in Commands
REPL comes packed with built-in helpers: