Unity.Netcode.NetworkSpawnManager
Class that handles object spawning
Inherited Members#
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Syntax#
Fields#
OwnershipToObjectsTable#
Use to get all NetworkObjects owned by a client Ownership to Objects Table Format: [ClientId][NetworkObjectId][NetworkObject] Server: Keeps track of all clients' ownership Client: Keeps track of only its ownership
Declaration#
Field Value#
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary\<System.UInt64, System.Collections.Generic.Dictionary\<System.UInt64, NetworkObject>> |
SpawnedObjects#
The currently spawned objects
Declaration#
Field Value#
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary\<System.UInt64, NetworkObject> |
SpawnedObjectsList#
A list of the spawned objects
Declaration#
Field Value#
| Type | Description |
|---|---|
| System.Collections.Generic.HashSet\<NetworkObject> |
Properties#
NetworkManager#
Gets the NetworkManager associated with this SpawnManager.
Declaration#
Property Value#
| Type | Description |
|---|---|
| NetworkManager |
Methods#
GetClientOwnedObjects(UInt64)#
Returns a list of all NetworkObjects that belong to a client.
Declaration#
Parameters#
| Type | Name | Description |
|---|---|---|
| System.UInt64 | clientId | the client's id LocalClientId |
Returns#
| Type | Description |
|---|---|
| System.Collections.Generic.List\<NetworkObject> |
GetLocalPlayerObject()#
Returns the local player object or null if one does not exist
Declaration#
Returns#
| Type | Description |
|---|---|
| NetworkObject | The local player object or null if one does not exist |
GetPlayerNetworkObject(UInt64)#
Returns the player object with a given clientId or null if one does not exist. This is only valid server side.
Declaration#
Parameters#
| Type | Name | Description |
|---|---|---|
| System.UInt64 | clientId |
Returns#
| Type | Description |
|---|---|
| NetworkObject | The player object with a given clientId or null if one does not exist |