docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

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

    Inheritance
    object
    TimeoutHelper
    TimeoutFrameCountHelper
    Inherited Members
    TimeoutHelper.k_DefaultTimeOutWaitPeriod
    TimeoutHelper.m_IsStarted
    TimeoutHelper.TimedOut
    TimeoutHelper.GetTimeElapsed()
    TimeoutHelper.Start()
    TimeoutHelper.Stop()
    TimeoutHelper.HasTimedOut()
    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 TimeoutFrameCountHelper : TimeoutHelper

    Constructors

    TimeoutFrameCountHelper(float, uint)

    Constructor

    Declaration
    public TimeoutFrameCountHelper(float timeOutPeriod = 2, uint tickRate = 30)
    Parameters
    Type Name Description
    float timeOutPeriod

    Optional timeout period.

    uint tickRate

    Optional tick rate.

    Methods

    GetFrameCount()

    Returns the number of frames that have occurred.

    Declaration
    public int GetFrameCount()
    Returns
    Type Description
    int

    Number of frames as an int.

    OnHasTimedOut()

    Virtual method returns true or false if timed out.

    Declaration
    protected override bool OnHasTimedOut()
    Returns
    Type Description
    bool

    true or false

    Overrides
    TimeoutHelper.OnHasTimedOut()
    Remarks

    Overriding this provides additional conditions to determine if it has timed out.

    OnStart()

    Virtual method to override in order to setup a derived class when started.

    Declaration
    protected override void OnStart()
    Overrides
    TimeoutHelper.OnStart()

    OnStop()

    Virtual method to override in order to clean up or other related logic when stopped.

    Declaration
    protected override void OnStop()
    Overrides
    TimeoutHelper.OnStop()
    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)