docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CategoricalParameter<T>

    Generates samples by choosing one option from a list of choices

    Inheritance
    object
    Parameter
    CategoricalParameterBase
    CategoricalParameter<T>
    GameObjectParameter
    MaterialParameter
    StringParameter
    Inherited Members
    Parameter.GetDisplayName(Type)
    Parameter.name
    Parameter.target
    Parameter.hasTarget
    Parameter.ResetState(int)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.Perception.Randomization.Parameters
    Assembly: solution.dll
    Syntax
    [Serializable]
    public abstract class CategoricalParameter<T> : CategoricalParameterBase
    Type Parameters
    Name Description
    T

    The sample type of the categorical parameter

    Constructors

    Name Description
    CategoricalParameter()

    Constructs a new categorical parameter

    CategoricalParameter(IEnumerable<(T, float)>)

    Creates a new categorical parameter from a list of categories and their associated probabilities

    CategoricalParameter(IEnumerable<T>)

    Create a new categorical parameter from a list of categories with uniform probabilities

    Properties

    Name Description
    categories

    Returns a list of the potential categories this parameter can generate

    sampleType

    The sample type generated by this parameter

    samplers

    Returns a list containing the samplers attached to this parameter

    Methods

    Name Description
    GetCategory(int)

    Returns the category stored at the specified index

    GetProbability(int)

    Returns the probability value stored at the specified index

    Sample()

    Generates a sample

    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)