Method GetFirstGhostTypeId
GetFirstGhostTypeId(NativeArray<GhostInstance>)
Find the first valid ghost type id in an array of ghost components. Pre-spawned ghosts have type id -1.
Declaration
public static int GetFirstGhostTypeId(this NativeArray<GhostInstance> self)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<GhostInstance> | self |
Returns
Type | Description |
---|---|
int | The ghost type index if a ghost with a valid type is found, -1 otherwise |
GetFirstGhostTypeId(NativeArray<GhostInstance>, out int)
Find the first valid ghost type id in an array of ghost components. Pre-spawned ghosts have type id -1. This method returns -1 if no ghost type id is found.
Declaration
public static int GetFirstGhostTypeId(this NativeArray<GhostInstance> self, out int firstGhost)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<GhostInstance> | self | |
int | firstGhost | The first valid ghost type index found will be stored in this variable. |
Returns
Type | Description |
---|---|
int | A valid ghost type id, or -1 if no ghost type id was found. |