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
I've been playing around with BMS for a couple of weeks. It pretty impressive!
As far as I can tell, the only way to handle events is via ScriptCallbackEvent + event_handler::<OnEvent, LuaScriptingPlugin>. This works, but is fairly boilerplate heavy on the rust side, needing two sets of event registration types/code, and relatively opinionated since event_handler handles the dispatch in a specific way. Are there plans to make event handling more inline with bevy in the future? Specifically:
EventReader<E> / EventWriter<E>
Being able to use EventReader and EventWriter natively from script systems via system_builder. A cache/performance friendly way to handle lots of the same kind of event. Theoretically, no BMS specific registrations or boilerplate needed.
Trigger<E>
Being able to use Trigger<E> natively from script systems via system_builder. Theoretically, no BMS specific registrations or boilerplate needed.
One-off ScriptCallbackEvent-like dispatch
An easy way to manually dispatch a script event handler. Basically what event_handler already does, just for a single event. Maybe this can even be abstracted to easily dispatch any script function by name, where event handling is just one use case.
Note: I'm using the pre-v0.17 bevy event/trigger terms.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've been playing around with BMS for a couple of weeks. It pretty impressive!
As far as I can tell, the only way to handle events is via
ScriptCallbackEvent
+event_handler::<OnEvent, LuaScriptingPlugin>
. This works, but is fairly boilerplate heavy on the rust side, needing two sets of event registration types/code, and relatively opinionated sinceevent_handler
handles the dispatch in a specific way. Are there plans to make event handling more inline with bevy in the future? Specifically:EventReader<E>
/EventWriter<E>
Being able to use
EventReader
andEventWriter
natively from script systems viasystem_builder
. A cache/performance friendly way to handle lots of the same kind of event. Theoretically, no BMS specific registrations or boilerplate needed.Trigger<E>
Being able to use
Trigger<E>
natively from script systems viasystem_builder
. Theoretically, no BMS specific registrations or boilerplate needed.ScriptCallbackEvent
-like dispatchAn easy way to manually dispatch a script event handler. Basically what
event_handler
already does, just for a single event. Maybe this can even be abstracted to easily dispatch any script function by name, where event handling is just one use case.Note: I'm using the pre-v0.17 bevy event/trigger terms.
Beta Was this translation helpful? Give feedback.
All reactions