Skip to content

Commit

Permalink
Fix example in readme (#10)
Browse files Browse the repository at this point in the history
Just a small fix, I copied the example and it did not work with latest version of bevy, this matches what is shown in documentation.
  • Loading branch information
richardhozak authored Jan 8, 2024
1 parent 71060ec commit 500de39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bevy-scene-hook = "9.0.0"
```
2. Add the plugin
```rust,ignore
.add_plugin(HookPlugin)
.add_plugins(HookPlugin)
```

### Example
Expand All @@ -37,7 +37,7 @@ struct Pile(PileType);
struct Card;

fn load_scene(mut cmds: Commands, asset_server: Res<AssetServer>) {
cmds.spawn_bundle(HookedSceneBundle {
cmds.spawn(HookedSceneBundle {
scene: SceneBundle { scene: asset_server.load("scene.glb#Scene0"), ..default() },
hook: SceneHook::new(|entity, cmds| {
match entity.get::<Name>().map(|t|t.as_str()) {
Expand Down

0 comments on commit 500de39

Please sign in to comment.