Method TryGet
TryGet(out NetworkObject, NetworkManager)
Tries to get the NetworkObject referenced by this reference.
Declaration
public bool TryGet(out NetworkObject networkObject, NetworkManager networkManager = null)
Parameters
Type | Name | Description |
---|---|---|
NetworkObject | networkObject | The NetworkObject which was found. Null if no object was found. |
NetworkManager | networkManager | The networkmanager. Uses Singleton to resolve if null. |
Returns
Type | Description |
---|---|
bool | True if the NetworkObject was found; False if the NetworkObject was not found. This can happen if the NetworkObject has not been spawned yet. you can try getting the reference at a later point in time. |