Namespace Unity.Netcode.TestHelpers.Runtime
Classes
ConditionalPredicateBase
Derive from this class to create your own conditional handling for your NetcodeIntegrationTest integration tests when dealing with more complicated scenarios where initializing values, storing state to be used across several integration tests.
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>
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 WaitForConditionOrTimeOut(Func<bool>, TimeoutHelper) in the event the default timeout period needs to be adjusted
Interfaces
IConditionalPredicate
Enums
NetcodeIntegrationTest.HostOrServer
NetcodeIntegrationTest.NetworkManagerInstatiationMode
NetworkManagerHelper.NetworkManagerOperatingMode
This provides the ability to start NetworkManager in various modes