docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    ConditionalPredicateBase
    MessageHooksConditional
    Implements
    IConditionalPredicate
    Inherited Members
    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 ConditionalPredicateBase : IConditionalPredicate

    Properties

    TimedOut

    Will be set to true if timed out.

    Declaration
    public bool TimedOut { get; }
    Property Value
    Type Description
    bool

    Methods

    Finished(bool)

    Wait for condition has finished:
    Condition(s) met or timed out

    Declaration
    public void Finished(bool timedOut)
    Parameters
    Type Name Description
    bool timedOut

    true or false

    HasConditionBeenReached()

    Test the conditions of the test to be reached

    Declaration
    public bool HasConditionBeenReached()
    Returns
    Type Description
    bool

    true or false

    OnFinished()

    Override this to clean up anything used in the conditional check.

    Declaration
    protected virtual void OnFinished()

    OnHasConditionBeenReached()

    Override this method to incorporate your own conditional logic

    Declaration
    protected virtual bool OnHasConditionBeenReached()
    Returns
    Type Description
    bool

    true for condition being met and false for the condition has yet to be met.

    OnStarted()

    Override this to initialize anything for the conditioinal check.

    Declaration
    protected virtual void OnStarted()

    Started()

    Wait for condition has started

    Declaration
    public void Started()

    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)