Struct SpawnedGhost
Struct used to uniquely identify a ghost given its id and spawning time.
Inherited Members
Namespace: Unity.NetCode
Syntax
public struct SpawnedGhost : IEquatable<SpawnedGhost>
Constructors
SpawnedGhost(Int32, NetworkTick)
Construct a SpawnedEntity using the ghost identifier and the spawn tick>
Declaration
public SpawnedGhost(int ghostId, NetworkTick spawnTick)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | 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 |
|---|---|
| Int32 |
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 |
|---|---|
| Boolean |
Implements
GetHashCode()
Produce the hash code for the SpawnedGhost.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 |