Struct SpawnedGhost
Struct used to uniquely identify a ghost given its id and spawning time.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct SpawnedGhost : IEquatable<SpawnedGhost>
Constructors
SpawnedGhost(int, NetworkTick)
Construct a SpawnedEntity using the ghost identifier and the spawn tick>
Declaration
public SpawnedGhost(int ghostId, NetworkTick spawnTick)
Parameters
Type | Name | Description |
---|---|---|
int | ghostId | |
NetworkTick | spawnTick |
SpawnedGhost(in GhostInstance)
Construct a SpawnedEntity from a GhostInstance
Declaration
public SpawnedGhost(in GhostInstance ghostInstance)
Parameters
Type | Name | Description |
---|---|---|
GhostInstance | ghostInstance | The ghost from witch t |
Fields
ghostId
The id assigned to the ghost by the server
Declaration
public int ghostId
Field Value
Type | Description |
---|---|
int |
spawnTick
The tick at which the ghost has been spawned by the server
Declaration
public NetworkTick spawnTick
Field Value
Type | Description |
---|---|
NetworkTick |
Methods
Equals(SpawnedGhost)
The SpawnedGhost are identical if both id and tick match.
Declaration
public bool Equals(SpawnedGhost ghost)
Parameters
Type | Name | Description |
---|---|---|
SpawnedGhost | ghost |
Returns
Type | Description |
---|---|
bool |
GetHashCode()
Produce the hash code for the SpawnedGhost.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |