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
don't error when sending HierarchyEvents when Event type not registered (bevyengine#7031)
# Objective
- Loading a gltf files prints many errors
```
ERROR bevy_ecs::world: Unable to send event `bevy_hierarchy::events::HierarchyEvent`
Event must be added to the app with `add_event()`
https://docs.rs/bevy/*/bevy/app/struct.App.html#method.add_event
```
- Loading a gltf file create a world for a scene where events are not registered. Executing hierarchy commands on that world should not print error
## Solution
- Revert part of bevyengine#6921
- don't use `world.send_event` / `world.send_event_batch` from commands
/// Spawns an [`Entity`] with no components and inserts it into the children defined by the [`WorldChildBuilder`] which adds the [`Parent`] component to it.
348
363
pubfnspawn_empty(&mutself) -> EntityMut<'_>{
349
364
let entity = self.world.spawn(Parent(self.parent)).id();
0 commit comments