Skip to main content

Unity.Netcode.NetworkSpawnManager

Class that handles object spawning

Inheritance#

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Inherited Members#

Object.Equals(Object)

Object.Equals(Object, Object)

Object.GetHashCode()

Object.GetType()

Object.MemberwiseClone()

Object.ReferenceEquals(Object, Object)

Object.ToString()

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public class NetworkSpawnManager

SpawnedObjects#

The currently spawned objects

Declaration#

public readonly Dictionary<ulong, NetworkObject> SpawnedObjects

Field Value#

TypeDescription
System.Collections.Generic.Dictionary\<System.UInt64, NetworkObject>

SpawnedObjectsList#

A list of the spawned objects

Declaration#

public readonly HashSet<NetworkObject> SpawnedObjectsList

Field Value#

TypeDescription
System.Collections.Generic.HashSet\<NetworkObject>

#

NetworkManager#

Gets the NetworkManager associated with this SpawnManager.

Declaration#

public NetworkManager NetworkManager { get; }

Property Value#

TypeDescription
NetworkManager

#

GetLocalPlayerObject()#

Returns the local player object or null if one does not exist

Declaration#

public NetworkObject GetLocalPlayerObject()

Returns#

TypeDescription
NetworkObjectThe 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#

public NetworkObject GetPlayerNetworkObject(ulong clientId)

Parameters#

TypeNameDescription
System.UInt64clientId

Returns#

TypeDescription
NetworkObjectThe player object with a given clientId or null if one does not exist