Live Coding
Live Coding (Ctrl+Alt+F11 in the editor) patches the code of a running editor. It works well for the logic of your own code that uses Pulse: function bodies of components, conditions, steps of exchanges, request handlers. Some things are built once when a module starts and are not built again by Live Coding. After changing them, close the editor and start it again.
Restart the editor after changing
| What you changed | Why Live Coding is not enough |
|---|---|
Registrations in StartupModule of your module: message channels (RegisterChannel), texts of reasons (RegisterReason), text providers, snapshot providers of the debugger, hold actions | StartupModule does not run again; the registers keep the old entries (and the old functions they point to) |
| Registrations of the editor module: plugins of the Pulse window, checks, views, actions, card classes, guides | Same: they are registered once when the editor module starts |
Headers with UCLASS, USTRUCT, UENUM, UPROPERTY, UFUNCTION (new members, new types, changed defaults) | Reflection and existing objects are built from the old layout; saved data and Blueprints may see a mix |
Native gameplay tags (UE_DEFINE_GAMEPLAY_TAG) | The tag table is built when the editor starts |
Settings classes (UPulseDeveloperSettings, UDeveloperSettings) | The default object and its config were loaded with the old class |
| New files or modules | Build the editor target with the editor closed, so the build knows them |
When something behaves strangely after a patch (a message nobody receives, a reason without its text, a debugger page that shows old values), restart the editor before looking for a bug.
Good practice
- Keep the logic in functions and the registration in one place, so most changes are function bodies.
- Run specs and PIE checks after a restart, not on a patched editor, before you commit.
- In packaged games none of this matters: Live Coding only exists in the editor.