From 586722efbf614095b4549956f957cec3c93b8f06 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Mon, 16 Sep 2024 05:06:43 +0300 Subject: [PATCH] Document replicon conditions specifics (#9) --- src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7b75d21..0f4900a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -62,6 +62,17 @@ let connection_config = ConnectionConfig { For a full example of how to initialize a server or client see the example in the repository. + +## Replicon conditions + +The crate updates the running state of [`RepliconServer`] and connection state of [`RepliconClient`] +based on the states of [`RenetServer`](renet::RenetServer) and [`RenetClient`](renet::RenetServer) +in [`PreUpdate`]. + +This means that [replicon conditions](bevy_replicon::core::common_conditions) won't work in schedules +like [`Startup`]. As a workaround, you can directly check if renet's resources are present. This may be resolved +in the future once we have [observers for resources](https://github.com/bevyengine/bevy/issues/12231) +to immediately react to changes. */ #![cfg_attr(docsrs, feature(doc_auto_cfg))]