API reference
API reference
Select your platform
No SDKs available
No versions available

CustomNetworkObjectProvider Class

Extends NetworkObjectProviderDefault
A custom provider to allow composing NetworkObjects programmatically (instead of placing in-Scene or spawning from Prefabs).
This object should be attached onto NetworkRunner object.

Properties

static NetworkObjectBaker Baker[Get]

Static Member Functions

Register your custom network object spawning function before the object is spawned.
e.g. register in InitializeOnLoad function
Parameters
customPrefabID
Used to identify the custom object. Should be unique and larger than 100000
func
Function that compose a GameObject (NetworkObject) programmatically

Member Functions

override NetworkObjectAcquireResult AcquirePrefabInstance
( NetworkRunner runner,
in NetworkPrefabAcquireContext context,
out NetworkObject result )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon