docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MessageHooksConditional

    A Netcode for GameObjects message conditional class to determine if a specific message has been sent or received.

    Inheritance
    object
    ConditionalPredicateBase
    MessageHooksConditional
    Implements
    IConditionalPredicate
    Inherited Members
    ConditionalPredicateBase.TimedOut
    ConditionalPredicateBase.HasConditionBeenReached()
    ConditionalPredicateBase.OnStarted()
    ConditionalPredicateBase.Started()
    ConditionalPredicateBase.Finished(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    ConditionalPredicateBase.OnFinished()

    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
    ConditionalPredicateBase.OnHasConditionBeenReached()

    Reset()

    Resets the instance.

    Declaration
    public void Reset()

    Implements

    IConditionalPredicate
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)