Crate bevy_sync

Source
Expand description

bevy_sync

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

Modules§

prelude

Structs§

ClientPlugin
Plugin used for joining a host
InitialSyncFinished
PromoteToHostEvent
Use this event to promote one of the clients as host
ServerPlugin
Plugin used for hosting mode
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, but it’s still available to distinguish later on which entity is synched and which unique id is being used for it.
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
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.