Method AddHandler
AddHandler(GameObject, INetworkPrefabInstanceHandler)
Use a GameObject to register a class that implements the INetworkPrefabInstanceHandler interface with the NetworkPrefabHandler
Declaration
public bool AddHandler(GameObject networkPrefabAsset, INetworkPrefabInstanceHandler instanceHandler)
Parameters
Type | Name | Description |
---|---|---|
GameObject | networkPrefabAsset | the GameObject of the network prefab asset to be overridden |
INetworkPrefabInstanceHandler | instanceHandler | class that implements the INetworkPrefabInstanceHandler interface to be registered |
Returns
Type | Description |
---|---|
bool | true (registered) false (failed to register) |
AddHandler(NetworkObject, INetworkPrefabInstanceHandler)
Use a NetworkObject to register a class that implements the INetworkPrefabInstanceHandler interface with the NetworkPrefabHandler
Declaration
public bool AddHandler(NetworkObject prefabAssetNetworkObject, INetworkPrefabInstanceHandler instanceHandler)
Parameters
Type | Name | Description |
---|---|---|
NetworkObject | prefabAssetNetworkObject | the NetworkObject of the network prefab asset to be overridden |
INetworkPrefabInstanceHandler | instanceHandler | the class that implements the INetworkPrefabInstanceHandler interface to be registered |
Returns
Type | Description |
---|---|
bool |
AddHandler(uint, INetworkPrefabInstanceHandler)
Use a GlobalObjectIdHash to register a class that implements the INetworkPrefabInstanceHandler interface with the NetworkPrefabHandler
Declaration
public bool AddHandler(uint globalObjectIdHash, INetworkPrefabInstanceHandler instanceHandler)
Parameters
Type | Name | Description |
---|---|---|
uint | globalObjectIdHash | the GlobalObjectIdHash value of the network prefab asset being overridden |
INetworkPrefabInstanceHandler | instanceHandler | a class that implements the INetworkPrefabInstanceHandler interface |
Returns
Type | Description |
---|---|
bool |