Class MessageHooksConditional
A Netcode for GameObjects message conditional class to determine if a specific message has been sent or received.
Implements
Inherited Members
Namespace: Unity.Netcode.TestHelpers.Runtime
Assembly: Unity.Netcode.Runtime.Tests.dll
Syntax
public class MessageHooksConditional : ConditionalPredicateBase, IConditionalPredicate
Constructors
MessageHooksConditional(List<MessageHookEntry>)
Constructor that takes a list of MessageHookEntry class instances.
Declaration
public MessageHooksConditional(List<MessageHookEntry> messageHookEntries)
Parameters
Type | Name | Description |
---|---|---|
List<MessageHookEntry> | messageHookEntries | The list of MessageHookEntry class instances that defines the messages to wait for. |
Properties
AllMessagesReceived
When true, all messages have been received.
Declaration
public bool AllMessagesReceived { get; }
Property Value
Type | Description |
---|---|
bool |
NumberOfMessagesReceived
Returns the number of messages received.
Declaration
public int NumberOfMessagesReceived { get; }
Property Value
Type | Description |
---|---|
int |
Methods
GetHooksStillWaiting()
For debug logging purposes, this returns the MessageHooks still remaining as a string.
Declaration
public string GetHooksStillWaiting()
Returns
Type | Description |
---|---|
string | A list of the remaining message hooks. |
OnFinished()
Override this to clean up anything used in the conditional check.
Declaration
protected override void OnFinished()
Overrides
OnHasConditionBeenReached()
Override this method to incorporate your own conditional logic
Declaration
protected override bool OnHasConditionBeenReached()
Returns
Type | Description |
---|---|
bool | true for condition being met and false for the condition has yet to be met. |
Overrides
Reset()
Resets the instance.
Declaration
public void Reset()