docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor NetworkTime

    NetworkTime(uint)

    Creates a new instance of the NetworkTime struct.

    Declaration
    public NetworkTime(uint tickRate)
    Parameters
    Type Name Description
    uint tickRate

    The tickrate.

    NetworkTime(uint, int, double)

    Creates a new instance of the NetworkTime struct.

    Declaration
    public NetworkTime(uint tickRate, int tick, double tickOffset = 0)
    Parameters
    Type Name Description
    uint tickRate

    The tickrate.

    int tick

    The time will be created with a value where this many tick have already passed.

    double tickOffset

    Can be used to create a NetworkTime with a non fixed time value by adding an offset to the given tick value.

    NetworkTime(uint, double)

    Creates a new instance of the NetworkTime struct.

    Declaration
    public NetworkTime(uint tickRate, double timeSec)
    Parameters
    Type Name Description
    uint tickRate

    The tickrate.

    double timeSec

    The time value as a float.

    In This Article
    Back to top
    Copyright © 2024 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)