docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SamplerState

    Encapsulates the random state that all samplers mutate when generating random values

    Inheritance
    object
    SamplerState
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.Randomization.Samplers
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    public static class SamplerState

    Fields

    randomState

    The central random state that all samplers mutate when generating random numbers

    Declaration
    public static uint randomState
    Field Value
    Type Description
    uint

    Methods

    CreateGenerator()

    Creates a random number generator seeded with a unique random state

    Declaration
    public static Random CreateGenerator()
    Returns
    Type Description
    Random

    The seeded random number generator

    NextRandomState()

    Generates a new random state and overwrites the old random state with the newly generated value

    Declaration
    public static uint NextRandomState()
    Returns
    Type Description
    uint

    The newly generated random state

    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)