Crate bevy_sync

Crate bevy_sync 

Source
Expand description

bevy_sync

Plugin for synchronizing entities and components between server and its clients.

Modules§

prelude

Structs§

ConnectCommand
Use this command to initiate a connection.
DisconnectCommand
Use this command to disconnect from the network.
InitialSyncFinished
PromoteToHostCommand
Use this command to promote one of the clients to become the new host. The list of client ids are obtainable through when the join event happens.
SyncEntity
Keeps track of the entity uuid used by bevy_sync across clients. This is automatically created on entities marked with SyncMark. You don’t need to add this one, it’s only a marker.
SyncExclude
Use this component to mark which component in the entity to exclude from sync. This will skip synchronization only for the specific entity that is marked by this component, and onlt for the component T inside that entity. To skip more components into an entity, add more variations of this for more types.
SyncMark
Use this component to mark which entities to be synched. This component will be replaced with SyncEntity once the system engages on it.
SyncPlugin
Main bevy_sync plugin to setup for sync Add this to the bevy app minimally, then either ServerPlugin or ClientPlugin.
Uuid
Use this event to promote one of the clients as host A Universally Unique Identifier (UUID).

Enums§

ClientState
Published state for client connectivity.
ServerState
Published state for server connectivity.
SyncConnectionParameters
Specify networking options to create a session. This will also be available as a resource.

Traits§

SyncComponent
Use this trait extension to configure sync details for your app. Every component that needs to be synched must be called with sync_component. To enable assets synching, use the other sync_* methods. By default nothing is being synched, so you’ll need to additively call all these.
SyncWorld
Utility funcions to discover clients uuids.