Unity.Netcode.NetworkSpawnManager
Class that handles object spawning
#
Inherited MembersSystem.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#
OwnershipToObjectsTableUse 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 ValueType | Description |
---|---|
System.Collections.Generic.Dictionary\<System.UInt64, System.Collections.Generic.Dictionary\<System.UInt64, NetworkObject>> |
#
SpawnedObjectsThe currently spawned objects
#
Declaration#
Field ValueType | Description |
---|---|
System.Collections.Generic.Dictionary\<System.UInt64, NetworkObject> |
#
SpawnedObjectsListA list of the spawned objects
#
Declaration#
Field ValueType | Description |
---|---|
System.Collections.Generic.HashSet\<NetworkObject> |
#
Properties#
NetworkManagerGets the NetworkManager associated with this SpawnManager.
#
Declaration#
Property ValueType | Description |
---|---|
NetworkManager |
#
Methods#
GetClientOwnedObjects(UInt64)Returns a list of all NetworkObjects that belong to a client.
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId | the client's id LocalClientId |
#
ReturnsType | Description |
---|---|
System.Collections.Generic.List\<NetworkObject> |
#
GetLocalPlayerObject()Returns the local player object or null if one does not exist
#
Declaration#
ReturnsType | 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#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId |
#
ReturnsType | Description |
---|---|
NetworkObject | The player object with a given clientId or null if one does not exist |