Method GetNetworkObjectByRepresentation
GetNetworkObjectByRepresentation(ulong, NetworkManager, ResultWrapper<NetworkObject>, bool, float)
Gets a NetworkObject instance as it's represented by a certain peer.
Declaration
public static IEnumerator GetNetworkObjectByRepresentation(ulong networkObjectId, NetworkManager representation, NetcodeIntegrationTestHelpers.ResultWrapper<NetworkObject> result, bool failIfNull = true, float timeout = 4)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | networkObjectId | The networkObjectId to get |
| NetworkManager | representation | The representation to get the object from |
| NetcodeIntegrationTestHelpers.ResultWrapper<NetworkObject> | result | The result |
| bool | failIfNull | Whether or not to fail if no object is found and result is null |
| float | timeout |
Returns
| Type | Description |
|---|---|
| IEnumerator |
GetNetworkObjectByRepresentation(Func<NetworkObject, bool>, NetworkManager, ResultWrapper<NetworkObject>, bool, float)
Gets a NetworkObject instance as it's represented by a certain peer.
Declaration
public static IEnumerator GetNetworkObjectByRepresentation(Func<NetworkObject, bool> predicate, NetworkManager representation, NetcodeIntegrationTestHelpers.ResultWrapper<NetworkObject> result, bool failIfNull = true, float timeout = 4)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<NetworkObject, bool> | predicate | The predicate used to filter for your target NetworkObject |
| NetworkManager | representation | The representation to get the object from |
| NetcodeIntegrationTestHelpers.ResultWrapper<NetworkObject> | result | The result |
| bool | failIfNull | Whether or not to fail if no object is found and result is null |
| float | timeout |
Returns
| Type | Description |
|---|---|
| IEnumerator |