Method TryGetComponentDataFromSnapshotHistory
TryGetComponentDataFromSnapshotHistory<T>(int, in DynamicBuffer<SnapshotDataBuffer>, out T, int)
Try to retrieve the data for a component type
Declaration
public bool TryGetComponentDataFromSnapshotHistory<T>(int ghostTypeIndex, in DynamicBuffer<SnapshotDataBuffer> snapshotBuffer, out T componentData, int slotIndex = 0) where T : unmanaged, IComponentData
Parameters
| Type | Name | Description |
|---|---|---|
| int | ghostTypeIndex | The index in the GhostCollectionPrefabSerializer collection. |
| DynamicBuffer<SnapshotDataBuffer> | snapshotBuffer | The entity snapshot history buffer. |
| T | componentData | The deserialized component data. |
| int | slotIndex | The slot in the history buffer to use. |
Returns
| Type | Description |
|---|---|
| bool | True if the component is present and the component data is initialized. False otherwise |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
Buffers aren't supported.
Only component present on the root entity can be retrieved. Trying to get data for component in a child entity is not supported.