Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way to insert components to loaded scenes #4980

Closed
wants to merge 3 commits into from

Commits on Jun 18, 2022

  1. Add way to insert components to loaded scenes

    This adds the `hook` field to `SceneBundle`. The `hook` is a
    `SceneHook`, which accepts a closure, that is ran once per entity in the
    scene. The closure can use the `EntityRef` argument to check components
    the entity has, and use the `EntityCommands` to add components and
    children to the entity.
    
    This code is adapted from https://github.com/nicopap/bevy-scene-hook
    
    Co-authored-by: Hennadii Chernyshchyk <genaloner@gmail.com>
    nicopap and Shatur committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    f00252d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d8ab55 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Remove Hook trait in favor of Fn trait

    This lowers API surface and complexity.
    nicopap committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    7a2e652 View commit details
    Browse the repository at this point in the history