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>
    ColorHsvaCategoricalParameter
    ColorRgbCategoricalParameter
    GameObjectParameter
    MaterialParameter
    StringParameter
    Texture2DParameter
    Inherited Members
    Parameter.GetDisplayName(Type)
    Parameter.ResetState()
    Parameter.IterateState(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

    Properties

    Name Description
    categories

    Returns a list of the potential categories this parameter can generate

    sampleType

    The sample type generated by this parameter

    Methods

    Name Description
    GenericSample()

    Generates a generic sample

    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

    SetOptions(IEnumerable<(T, float)>)

    Updates this parameter's list of categorical options

    SetOptions(IEnumerable<T>)

    Updates this parameter's list of categorical options

    Validate()

    Validates the categorical probabilities assigned to this parameter

    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)