Namespace Unity.Netcode.TestHelpers.Runtime
Classes
ConditionalPredicateBase
Derive from this class to create your own conditional handling for your Netcode
IntegrationTestWithApproximation
MessageHookEntry
MessageHooksConditional
MockTimeProvider
NetcodeIntegrationTest
The default Netcode for GameObjects integration test helper class
NetcodeIntegrationTestHelpers
Provides helpers for running multi instance tests.
NetcodeIntegrationTestHelpers.ResultWrapper<T>
Used to return a value of type T from a wait condition
NetworkManagerHelper
Helper class to instantiate a NetworkManager This also provides the ability to: --- instantiate GameObjects with NetworkObject components that returns a Guid for accessing it later. --- add NetworkBehaviour components to the instantiated GameObjects --- spawn a NetworkObject using its parent GameObject's Guid Call StartNetworkManager in the constructor of your runtime unit test class. Call ShutdownNetworkManager in the destructor of your runtime unit test class.
Includes a useful "BuffersMatch" method that allows you to compare two buffers (returns true if they match false if not)
NetworkVariableBaseHelper
The BaseNetworkVariableHelper keeps track of: The number of instances and associates the instance with the NetworkVariable The number of times a specific NetworkVariable instance had its value changed (i.e. !Equal) Note: This could be expanded for future tests focuses around NetworkVariables
NetworkVariableHelper<T>
Will automatically register for the NetworkVariable OnValueChanged delegate handler. It then will expose that single delegate invocation to anything that registers for this NetworkVariableHelper's instance's OnValueChanged event. This allows us to register any NetworkVariable type as well as there are basically two "types of types":
- IEquatable<T>
- ValueType
ObjectNameIdentifier
TimeoutFrameCountHelper
This can be used in place of TimeoutHelper if you suspect a test is having issues on a system where the frame rate is running slow than expected and allowing a certain number of frame updates is required.
TimeoutHelper
Can be used independently or assigned to Wait
Interfaces
IConditionalPredicate
Enums
NetcodeIntegrationTest.HostOrServer
NetcodeIntegrationTest.NetworkManagerInstatiationMode
NetcodeIntegrationTest.SceneManagementState
NetworkManagerHelper.NetworkManagerOperatingMode
This provides the ability to start NetworkManager in various modes