You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for allowing the editor to request that a new entity be added to the game world.
Add a new variant to IncomingMessage called CreateEntities for requesting that an entity be created. The variant should carry a field specifying how many entities should be created.
Add a new field to outgoing messages "created_entities" that is a list of any entities that were just created at the request of the editor.
The list of new entities should be sent as soon as the entities are created, ideally on the same frame.
The list of new entities should only be sent once.
Similarly, to support destroying entities at runtime we'll need to add a variant to IncomingMessage called DestroyEntities that takes a list of entities to be destroyed. The list of destroyed entities does not need to be sent back to the editor, though.
The text was updated successfully, but these errors were encountered:
Yup, you'll need to do both! The core functionality is implemented in amethyst-editor-sync, and then you only need to add the corresponding UI elements to the Electron editor and have them send the right messages back to the game.
I made some progress in refactoring a lot of the code (after a lack in spare time to work on this) in general to do something like:
Receive editor input -> Update states -> read new states -> send updated data back to the editor
I will do some refactoring of the code base now too, and then add the few lines for entity creation/deleting too. I will make an PR this weekend regarding the first part for review, maybe the second too. :)
Add support for allowing the editor to request that a new entity be added to the game world.
IncomingMessage
calledCreateEntities
for requesting that an entity be created. The variant should carry a field specifying how many entities should be created."created_entities"
that is a list of any entities that were just created at the request of the editor.Similarly, to support destroying entities at runtime we'll need to add a variant to
IncomingMessage
calledDestroyEntities
that takes a list of entities to be destroyed. The list of destroyed entities does not need to be sent back to the editor, though.The text was updated successfully, but these errors were encountered: