MLAPI.Spawning.NetworkSpawnManager
Class that handles object spawning
#
Inherited MembersObject.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#
Fields#
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> |
#
Methods#
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 |
#
GetNetworkPrefabIndexOfHash(UInt64)Gets the prefab index of a given prefab hash
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | hash | The hash of the prefab |
#
ReturnsType | Description |
---|---|
System.Int32 | The index of the prefab |
#
GetPlayerNetworkObject(UInt64)Returns the player object with a given clientId or null if one does not exist
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId |
#
ReturnsType | Description |
---|---|
NetworkObject | The player object with a given clientId or null if one does not exist |
#
GetPrefabHashFromGenerator(String)Returns the prefab hash for a given prefab hash generator
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.String | generator | The prefab hash generator |
#
ReturnsType | Description |
---|---|
System.UInt64 | The hash for the given generator |
#
GetPrefabHashFromIndex(Int32)Returns the prefab hash for the NetworkPrefab with a given index
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Int32 | index | The NetworkPrefab index |
#
ReturnsType | Description |
---|---|
System.UInt64 | The prefab hash for the given prefab index |
#
RegisterDestroyHandler(UInt64, NetworkSpawnManager.DestroyHandlerDelegate)Registers a delegate for destroying NetworkObjects, useful for object pooling
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | prefabHash | The prefab hash to destroy |
NetworkSpawnManager.DestroyHandlerDelegate | handler | The delegate handler |
#
RegisterSpawnHandler(UInt64, NetworkSpawnManager.SpawnHandlerDelegate)Registers a delegate for spawning NetworkPrefabs, useful for object pooling
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | prefabHash | The prefab hash to spawn |
NetworkSpawnManager.SpawnHandlerDelegate | handler | The delegate handler |
#
UnregisterDestroyHandler(UInt64)Unregisters the custom destroy handler for a specific prefab hash
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | prefabHash | The prefab hash of the prefab destroy handler that is to be removed |
#
UnregisterSpawnHandler(UInt64)Unregisters the custom spawn handler for a specific prefab hash
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | prefabHash | The prefab hash of the prefab spawn handler that is to be removed |