Editor Workflow
This page covers everything the editor plugin adds and how to use it day-to-day.
The Tools menu
Under Tools → TPScript you'll find:
| Command | What it does |
|---|---|
| Run Regeneration | Transpile every .tps source into UE5 C++ modules |
| Open TPScript Panel | Opens the dockable TPScript panel |
| Compile | Transpile, then compile (Live Coding when available) |
| Open TPScripts Folder | Opens the project TPScripts/ folder in Explorer (creates it if missing) |
There is also a TPScript button in the Level Editor's Play toolbar (refresh icon) that runs a quick regeneration.
The TPScript panel
A dockable panel (tab name TPScript) with three views:
Edit
- A list of Modules (each module is a folder under
Source/that contains a.tpscript-manifest.json). - A multi-tab code editor with:
- Save / Save All / New / Close
- Dirty-state tracking (a
*next to modified tabs) - A status bar showing the path,
[Modified], and line count - An Output Log
- Regeneration buttons:
- Regenerate All - every module that has a manifest
- Regen Module - the selected module only
- Regen This File - only the currently open mechanic (writes just that mechanic's files, without touching others)
Files are auto-saved before a regeneration runs.
Examples
- Browse the plugin's
Examples/*.tpslist. Double-click one to open it in the editor. Examples are teaching files - copy one into your project'sTPScripts/folder to make it a real mechanic.
Docs
- Renders the plugin's
Docs/*.mdas styled Slate widgets: headers, tables, code fences, bold, inline code, blockquotes, and lists all render in the panel. A fast reference if you don't want to leave the editor.
Regeneration mechanics
TPScript discovers modules by looking for a .tpscript-manifest.json inside Source/<Module>/. This manifest tracks:
module- the module namesources- the.tpsfiles that feed itgenerated- every file the module produced (used for deterministic stale-file cleanup)
Sources are resolved from <Project>/TPScripts/**/*.tps. The demo module falls back to bundled corpus files so the examples always work.
Generated output is categorized into Public/<Category>/ and Private/<Category>/ based on the header kind and base class:
Actors,Components,Characters,AI,Game,UI,Player,Data,Camera,Weapons,Interactions,Pickups,Structs,Interfaces, …
When a module doesn't exist yet, TPScript creates its boilerplate: <Module>.Build.cs, <Module>.h, and <Module>.cpp. The generated Build.cs warns about required public dependencies (Core, CoreUObject, Engine, InputCore, EnhancedInput) and private dependencies (UMG, Slate, SlateCore, AIModule, GameplayTasks, GameplayTags, NavigationSystem).
The regeneration workflow
The intended daily rhythm:
- Put
.tpsfiles in<Project>/TPScripts/. - Open Tools → TPScript Panel.
- Click Regenerate All (creates the module + manifest + boilerplate the first time).
- Click Compile (or Live Coding / IDE build).
- Iterate on a single mechanic with Regen This File.
The api= meta - matching module API macros
Generated classes use an API macro that must match the module name uppercased:
| Module | API macro |
|---|---|
TpsGenerated | TPSGENERATED_API |
TpscriptKit | TPSCRIPTKIT_API |
Examples | EXAMPLES_API |
If a class is used across modules, keep meta: api=<MODULE>_API in sync with the module name. Examples in this repo use the module of the demo corpus.
Troubleshooting
- "No modules found" - make sure your
.tpsfiles are inTPScripts/and that a build has produced aSource/folder. Run Run Regeneration once to create the manifest. - Generated code doesn't compile - check that you enabled all required modules (e.g.
EnhancedInput,NavigationSystem) referenced by your.tps. Read the generatedBuild.csfor the exact list. - Live Coding not available - build the Editor target from your IDE (Live Coding must be enabled in your projects settings).