Struct SnapshotDataLookupHelper
Helper struct that can be used in your spawn classification systems (and classification
jobs) to create Snapshot
Inherited Members
Namespace: Unity.NetCode .LowLevel
Assembly: Unity.NetCode.dll
Syntax
public struct SnapshotDataLookupHelper
Constructors
SnapshotDataLookupHelper(ref SystemState, Entity, Entity)
Default constructor, collect and initialize all the internal Buffer
Declaration
public SnapshotDataLookupHelper(ref SystemState state, Entity ghostCollectionEntity, Entity spawnMapEntity)
Parameters
Type | Name | Description |
---|---|---|
System |
state | See: System |
Entity | ghostCollectionEntity | The entity that hold the GhostCollection component |
Entity | spawnMapEntity | The entity that hold the SpawnedGhostEntityMap component |
Methods
CreateSnapshotBufferLookup()
Create a new Snapshot
Declaration
public SnapshotDataBufferComponentLookup CreateSnapshotBufferLookup()
Returns
Type | Description |
---|---|
Snapshot |
A valid Snapshot |
Remarks
The method requires that the Update(ref System
Update(ref SystemState)
Call this method in your system OnUpdate to refresh all the internal Buffer
Declaration
public void Update(ref SystemState state)
Parameters
Type | Name | Description |
---|---|---|
System |
state | See: System |