Struct SnapshotDataLookupHelper
Helper struct that can be used in your spawn classification systems (and classification jobs) to create SnapshotDataBufferComponentLookup instances. In order to use the helper, the system that create/hold the instance, must be created after the GhostCollectionSystem and after the GhostReceiveSystem, because of the need to retrieve the SpawnedGhostEntityMap and the SnapshotDataLookupCache data.
Inherited Members
Namespace: Unity.NetCode.LowLevel
Assembly: solution.dll
Syntax
public struct SnapshotDataLookupHelper
Constructors
Name | Description |
---|---|
SnapshotDataLookupHelper(ref SystemState, Entity, Entity) | Default constructor, collect and initialize all the internal BufferFromEntity<T> handles and collect the necessary data structures. |
Methods
Name | Description |
---|---|
CreateSnapshotBufferLookup() | Create a new SnapshotDataBufferComponentLookup instance that can be used on the main thread or in job. This method introduce a sync point, because internally retrieve all the necessary DynamicBuffer<T>. |
Update(ref SystemState) | Call this method in your system OnUpdate to refresh all the internal BufferFromEntity<T> handles. |