docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RandomHelpers

    A simple method to obtain a random ushort provided by the Unity.Mathematics.Random class.

    Inheritance
    object
    RandomHelpers
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Networking.Transport.Utilities
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class RandomHelpers

    Methods

    GetRandomULong()

    Get a random ulong value.

    Declaration
    public static ulong GetRandomULong()
    Returns
    Type Description
    ulong

    a ushort in [1..uint.MaxValue - 1] range

    GetRandomUShort()

    Get a random ushort value.

    Declaration
    public static ushort GetRandomUShort()
    Returns
    Type Description
    ushort

    a ushort in [1..ushort.MaxValue - 1] range

    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)