Skip to content

Commit

Permalink
docs: Add toml example for toggling experimental feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluefinger committed Nov 11, 2024
1 parent 8589e82 commit ec711aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tutorial/04-observer-driven-reseeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

The following feature is _experimental_ so to enable it, you'll need to edit your Cargo.toml file and change the dependency declaration for `bevy_rand` to have `features=["experimental"]` applied. Once done, you'll get access to some utils that will enable easy setup of observer driven reseeding utilities for managing when entities with `EntropyComponent`s obtain new seeds from which sources. Keep in mind, this feature is not *stable* and will be subject to further work and iteration, so if problems and issues are encountered, please do create issues outlining the use-cases and difficulties.

```toml
bevy_rand = { version = "0.8", features = ["rand_chacha", "wyrand", "experimental"] }
```

By default, when the `experimental` feature is enabled, you'll be able to trigger a reseeding for a given entity either by pulling from a global source, or by providing a set seed value. This does not require any specific setup, and can simply be triggered by emitting the event on the entity needing to be reseeded. ALl observer events require providing a generic for the RNG algorithm to be targetted, as an entity could have multiple RNG sources attached to it.

```rust ignore
Expand Down

0 comments on commit ec711aa

Please sign in to comment.