Releases: mintlu8/bevy_defer
Release v0.9.0
What's New
- Replaced
futures_executor
withasync_executor
This is the same executor as bevy_tasks
, which would fit nicely in the bevy ecosystem. The AsyncExecutor
can now be cloned to spawn futures. Additionally, the dependency on futures
has been minimized to not include the macros.
- Id for
AsyncSystem
You can now add an id
to an AsyncSystem
to allow targeted removal from the AsyncSystems
component.
- The
AsyncAccess
trait.
Methods like get
, set
, watch
etc are now provided by the AsyncAccess
trait. This makes access methods in this crate more consistent. get
for example will never wait for something to be loaded. get_on_load
can now be used instead to wait for an item to be loaded before accessing it.
AsyncQuerySingle
Added a specialized accessor for the single()
query.
- Stream support
Signal
is now a Stream
, API regarding States
and Event
are now stream based.
- Reactors
Add systems react_to_*
to react to changes in the world.
react_to_state
allows you to react to state change asynchronouslyreact_to_event
allows you to subscribe to events asynchronously
Breaking Changes
-
get
,cloned
onAsyncAsset
no longer waits for the asset to be loaded, use the*_on_load
methods instead. -
The old
AsyncEvent
is scrapped and replaced withEventStream
. -
Renames
extension
is moved toaccess::deref
picking
is moved toext::picking
Release v0.8.0
What's Changed
- Better plugin modularity.
We can now add schedule and system sets via the new AsyncPlugin
.
- Non-Send internals
Most of this crate now runs on Rc
and RefCell
, this means we can drop some lifetimes around
not cloning Arc
s, you would find chaining methods much easier!
-
Thread locals!
-
We can push
&World
,Resource
andNonSend
to thread local storage, enabling more non-deferred access. -
AssetServer
,NamedSignals
,CommandQueue
are accessible via thread locals by default. -
With the optional
&World
thread local access, allget
access are immediate, at the cost of some parallelization.
-
-
AsyncEventReader
,AsyncAsset
and better named signal support-
AsyncEventReader
is now a persistent event reader that behaves properly. -
AsyncAsset
, or ratherHandle
can be accessed byAssetPath
without deferring. -
NamedSignals
can be accessed by name without deferring.
-
-
apply_command
andapply_command_queue
apply_command
uses a thread local CommandQueue
and is no longer async.
- Tweening
We can run cancellable and awaitable tweening functions on FixedUpdate
.
bevy_mod_picking
integration
We now have a reactor for bevy_mod_picking
.
Signals
rewrite
Signals
is no longer type erased, therefore Object
is no longer a part of this crate (see dyn_object
). Internals of signals are more encapsulated.
spawn
rename
spawn
is now the unbounded spawn method, since dropping futures can cause unexpected behaviors and should be opt-in.