From ec711aa2b2a7f432724871207e59441b32bbce85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Rica=20Pais=20da=20Silva?= Date: Mon, 11 Nov 2024 22:35:51 +0100 Subject: [PATCH] docs: Add toml example for toggling experimental feature --- tutorial/04-observer-driven-reseeding.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tutorial/04-observer-driven-reseeding.md b/tutorial/04-observer-driven-reseeding.md index 562501e..c9571b8 100644 --- a/tutorial/04-observer-driven-reseeding.md +++ b/tutorial/04-observer-driven-reseeding.md @@ -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