Loading the game library in the editor #56

Open
UnflavoredMeson/Primal_Plus_Plus
opened 2026-11-24 20:16:05 +00:00 by UnflavoredMeson · 0 comments
Owner

Why

The editor has to know a game's actor, part and behavior classes to place and edit them.

Decided

  • A platform:: helper loads the library (LoadLibrary/dlopen) inside the reflection load bracket (S3-04); unloading releases its types first.
  • Reload after a build: scenes keep their data by name; classes that disappeared show as missing, not deleted.

Read first

Steps

  • 1. Write tests with a test game library: load, list classes, reload a changed version.
  • 2. Add it to the editor with a Reload action.

Done when

  • A game's classes appear in Add Actor and survive a reload on both OSes; tests pass; 0 warnings; tidy 0.

Claude can help with

  • Unload-order bugs.

Learn

  • What has to happen before a library can be unloaded safely.
## Why The editor has to know a game's actor, part and behavior classes to place and edit them. ## Decided - A `platform::` helper loads the library (`LoadLibrary`/`dlopen`) inside the reflection load bracket (S3-04); unloading releases its types first. - Reload after a build: scenes keep their data by name; classes that disappeared show as missing, not deleted. ## Read first - [Editor](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Editor), section 5.7. ## Steps - [ ] 1. Write tests with a test game library: load, list classes, reload a changed version. - [ ] 2. Add it to the editor with a Reload action. ## Done when - [ ] A game's classes appear in Add Actor and survive a reload on both OSes; tests pass; 0 warnings; tidy 0. ## Claude can help with - Unload-order bugs. ## Learn - What has to happen before a library can be unloaded safely.
Sign in to join this conversation.
No assignees
No project
No milestone
Blocks Depends on
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
UnflavoredMeson/Primal_Plus_Plus#56
No description provided.