UI.entity() should be private or throw errors #19

Open
opened 2025-09-24 05:50:57 +00:00 by zedshaw · 0 comments
Owner

Looks like I can use entity() on accident causing a weird footgun. Either mark private, OR, have the render system realize the id isn't valid and abort. Example code:

      auto id = $actions.entity();
      $actions.set<Rectangle>(id, {});
      $actions.set<Text>(id, {guecs::to_wstring(name)});

Line 1 has the mistake, should be $actions.entity(name).

Looks like I can use entity() on accident causing a weird footgun. Either mark private, OR, have the render system realize the id isn't valid and abort. Example code: ```c++ auto id = $actions.entity(); $actions.set<Rectangle>(id, {}); $actions.set<Text>(id, {guecs::to_wstring(name)}); ``` Line 1 has the mistake, should be `$actions.entity(name)`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: games/lel-guecs#19
No description provided.