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 a NetworkRunner object. This is a helper component when using the Photon Fusion networking framework.
static NetworkObjectBaker Baker[Get]
static void RegisterCustomNetworkObject ( uint customPrefabID,
CustomNetworkObjectSpawnFunc func )
Register your custom network object spawning function before the object is spawned.
e.g. register in InitializeOnLoad function
ParameterscustomPrefabIDUsed to identify the custom object. Should be unique and larger than 100000
funcFunction that compose a GameObject (NetworkObject) programmatically
override NetworkObjectAcquireResult AcquirePrefabInstance ( NetworkRunner runner,
in NetworkPrefabAcquireContext context,
out NetworkObject result )