Method GetNetworkPrefabOverride
GetNetworkPrefabOverride(GameObject)
Returns the GameObject to use as the override as could be defined within the NetworkPrefab list Note: This should be used to create GameObject pools (with NetworkObject components) under the scenario where you are using the Host model as it spawns everything locally. As such, the override will not be applied when spawning locally on a Host. Related Classes and Interfaces: INetworkPrefabInstanceHandler
Declaration
public GameObject GetNetworkPrefabOverride(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | the GameObject to be checked for a NetworkManager defined NetworkPrefab override |
Returns
Type | Description |
---|---|
GameObject | a GameObject that is either the override or if no overrides exist it returns the same as the one passed in as a parameter |