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 wanted to make bunch of systems conditional (eg. running them only when the game is not paused). I thought I'd use the DispatcherBuilder::with_batch and decide if I want to call a sub-dispatcher in the controller.
But I'm not entirely sure how it is supposed to work. The Safety section of the create method isn't really clear on what must be uphold. What is „correctly constructed BatchAccessor“?
Furthermore, it references examples/batch_dispatching.rs, which doesn't exist (at least not on master).
So I'd like to ask if it's possible to describe how this thing works in some better way/add the missing example. Or am I trying to use the wrong tool for the job? Shouldn't something like enabling/disabling bunch of systems be possible without using unsafe?
I'm trying to wrap my head around how I would use the BatchController.
(I'm not sure if this belongs more into the feature or bug category, to be honest)
The text was updated successfully, but these errors were encountered:
I see the example lives in the shred repository. Might this be caused by specs re-exporting the types? I'll try to read through that and try to improve the docs a bit ‒ at least by linking the example directly.
196: Improve docs of BatchController r=azriel91 a=vorner
* Clarify safety of the `create` method.
* Link directly to the example on github; this saves some time searching
for it and it also avoids confusion in which repository the example
lives, as the trait is re-exported in `specs`.
Related to amethyst/specs#689.
Please do check that what I state here is correct. It's gathered from reading other documentation and trying to understand it as a user of the library, but I didn't write the code.
I'm not updating the changelog, since there's no actual code change, just some documentation improvements. If you think this still requires an entry, I'll add it.
Also, am I right to assume that if I register a batch that contains some thread-local systems, they'll still be handled as `!Send` internally and nothing will allow the user to move them to a different thread, etc?
Co-authored-by: Michal 'vorner' Vaner <[email protected]>
Description
I wanted to make bunch of systems conditional (eg. running them only when the game is not paused). I thought I'd use the
DispatcherBuilder::with_batch
and decide if I want to call a sub-dispatcher in the controller.But I'm not entirely sure how it is supposed to work. The
Safety
section of thecreate
method isn't really clear on what must be uphold. What is „correctly constructed BatchAccessor“?Furthermore, it references
examples/batch_dispatching.rs
, which doesn't exist (at least not on master).So I'd like to ask if it's possible to describe how this thing works in some better way/add the missing example. Or am I trying to use the wrong tool for the job? Shouldn't something like enabling/disabling bunch of systems be possible without using unsafe?
I'm trying to wrap my head around how I would use the BatchController.
(I'm not sure if this belongs more into the feature or bug category, to be honest)
The text was updated successfully, but these errors were encountered: