docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkTimeSystemTests

    Runtime tests to test the network time system with the Unity player loop.

    Inheritance
    object
    NetworkTimeSystemTests
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Netcode.RuntimeTests
    Assembly: Unity.Netcode.RuntimeTests.dll
    Syntax
    public class NetworkTimeSystemTests

    Methods

    CorrectAmountTicksTest()

    Tests whether the time system invokes the correct amount of ticks over a period of time. Note we cannot test against Time.Time directly because of floating point precision. Our time is more precise leading to different results.

    Declaration
    [UnityTest]
    public IEnumerator CorrectAmountTicksTest()
    Returns
    Type Description
    IEnumerator

    PlayerLoopFixedTimeTest()

    Declaration
    [UnityTest]
    public IEnumerator PlayerLoopFixedTimeTest()
    Returns
    Type Description
    IEnumerator

    PlayerLoopTimeTest_WithDifferentTimeScale(float)

    Tests whether time is accessible and has correct values inside Update, for multiples timeScale values.

    Declaration
    [UnityTest]
    public IEnumerator PlayerLoopTimeTest_WithDifferentTimeScale(float timeScale)
    Parameters
    Type Name Description
    float timeScale
    Returns
    Type Description
    IEnumerator

    Setup()

    Declaration
    [SetUp]
    public void Setup()

    TearDown()

    Declaration
    [TearDown]
    public void TearDown()
    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)