Struct GhostInstance
Component signaling an entity which is replicated over the network
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct GhostInstance : IComponentData, IQueryTypeParameter
Fields
Name | Description |
---|---|
ghostId | The id assigned to the ghost by the server. When a ghost is destroyed, its id is recycled and can assigned to new ghosts. For that reason the ghost id cannot be used an unique identifier. The ghostId, spawnTick pairs is instead guaratee to be unique, since at any given point in time, there can be one and only one ghost that have a given id that has been spawned at that specific tick. |
ghostType | The ghost prefab type, as index inside the ghost prefab collection. |
spawnTick | The tick the entity spawned on the server. Together with ghostId is guaranted to be always unique. |
Methods
Name | Description |
---|---|
ToFixedString() | Returns a human-readable GhostComponent FixedString, containing its values. |
Operators
Name | Description |
---|---|
implicit operator SpawnedGhost(in GhostInstance) | Implicitly convert a GhostComponent to a SpawnedGhost instance. |