Implement a structured interface for creating entities from C++ scripts #74
Labels
C++ Script API
Feature
New feature or request
module: engine
For features that involve the `engine` module. (optional)
Creation would be handled with an awaitable, driven by an event under the hood. -- This event would have a token/UUID obtained automatically for the entity creation request.
Archetype information would be encoded in the creation event, and the event itself would be handled by
EntitySystem
. Once the initial event is processed, a new event with the generated entity will be created, sending back the original UUID of the request. The script's awaitable would then capture the response event, giving back control.The creation awaitable may be best implemented by returning a wrapper type holding a 'lock' (#77) on the entity to ensure safety. The lock object could then be destroyed through implicit conversion to
Entity
if needed, or held as-is.The text was updated successfully, but these errors were encountered: