Expand description
Sync registration, snapshotting, and packet application. Sync registration, snapshots, and packet application.
This module is the bridge between Bevy ECS state and the wire format used by
NetResource. Attribute macros submit metadata into inventory; this module
collects that metadata, registers systems, and translates packets in both
directions.
Structs§
- Component
Registration - Metadata for a syncable component type.
- Prefab
Registration - Metadata for a prefab definition used to spawn visuals remotely.
- Prefab
Registry - Runtime registry for prefab handlers.
- Resource
Registration - Metadata for a syncable resource type.
- Sync
Registry - Runtime registry for component sync handlers.
- Sync
Resource Registry - Runtime registry for resource sync handlers.
Traits§
- Sync
Component - Trait implemented by syncable components.
- Sync
Resource - Trait implemented by syncable resources.
Functions§
- apply_
incoming_ packets - Applies queued incoming replication packets to the local world.
- assign_
network_ ids - Assigns network IDs to newly replicated entities on the server.
- assign_
prefab_ ids - Detects prefab matches on newly replicated entities.
- flush_
network_ outbox - Flushes queued packets after the frame has finished mutating state.
- hash_
type_ path - FNV-1a hash used to derive wire IDs from type paths.
- poll_
network_ incoming - Poll hook run before the main replication systems.
- register_
sync_ components - Collects all inventory registrations and stores them in runtime registries.
- replicate_
removals - Converts despawned replicated entities into network despawn packets.
- sync_
component - Sends updated sync components for entities that are added or changed.
- sync_
new_ connections - Sends the initial world state to newly connected clients.
- sync_
resource - Sends updated resources when they are added or changed.