Editor Mode
Editor Mode is your persistent, multi-line scripting space.
Unlike REPL Mode, which handles quick one-liners, Editor Mode lets you write full blocks of code, define classes, run entry points, and structure logic just like in a regular C# file, without recompiling or breaking flow.
This is where you build actual runtime logic.
Execution Flow
There are two main modes of execution:
1. Using an Entry Method
If “Start with Entry Template” is enabled in the preferences:
-
Scriptum expects an entry class, like:
-
You can customize the entry method name and class in preferences (e.g.
Startup.Init
) -
If the method is missing, Scriptum throws an error
This pattern is ideal for structured or reusable logic.
2. Freeform Mode
If “Start with Entry Template” is disabled:
-
You can write code directly without wrapping it in a class
-
It behaves more like an extended REPL
-
You can still define classes, bind variables, and call methods — just more freely
Example:
No entry point required. Perfect for fast iterations.Classes Hub
Editor Mode integrates directly with the Classes Hub:
-
Each class you write becomes a session object
-
You can include/exclude classes from execution
-
Compilation errors are flagged immediately
-
You can manage and organize all your runtime classes from one place
Use Cases
-
Write and run helper utilities or setup logic
-
Debug systems in isolation before coding them in production
-
Simulate gameplay or test interactions with live data
-
Quickly inject methods and logic during development
-
Run event sequences, animations, spawning, or visual logic
Tips
-
Use Live Variables to access scene objects without fetching them manually
-
Keep commonly used code as a Quick Spell
-
Use
manifest()
to inspect results in a structured way
Editor Toolbar
At the top of the Editor Mode panel, you'll find a dedicated action toolbar.
This toolbar includes common code operations like:
-
Navigate to
Main
-
Reset current class
-
Undo / Redo
-
Copy, Cut, Paste
-
Auto-indent toggle
-
Follow caret toggle
-
Save / Import / Export / Delete class
-
Add Quick or Live Spell from selection
On the far right, there's a zoom control to adjust font size on the fly.
This toolbar helps you stay fast, fluid, and focused without reaching for menus or memorizing shortcuts.