Class NumericParameter<T> | Perception | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class NumericParameter<T>

    Numeric parameters use samplers to generate randomized structs

    Inheritance
    Object
    Parameter
    NumericParameter<T>
    BooleanParameter
    ColorHsvaParameter
    ColorRgbParameter
    FloatParameter
    IntegerParameter
    Vector2Parameter
    Vector3Parameter
    Vector4Parameter
    Inherited Members
    Parameter.GetDisplayName(Type)
    Parameter.ResetState()
    Parameter.IterateState(Int32)
    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
    Syntax
    [Serializable]
    public abstract class NumericParameter<T> : Parameter where T : struct
    Type Parameters
    Name Description
    T

    The sample type of the parameter

    Properties

    sampleType

    The sample type of parameter

    Declaration
    public override sealed Type sampleType { get; }
    Property Value
    Type Description
    Type
    Overrides
    Parameter.sampleType

    Methods

    GenericSample()

    Generates a generic sample

    Declaration
    public override object GenericSample()
    Returns
    Type Description
    Object

    The generated sample

    Overrides
    Parameter.GenericSample()

    Sample()

    Generates one parameter sample

    Declaration
    public abstract T Sample()
    Returns
    Type Description
    T

    The generated sample

    Samples(Int32, out JobHandle)

    Schedules a job to generate an array of parameter samples. Call Complete() on the JobHandle returned by this function to wait on the job generating the parameter samples.

    Declaration
    public abstract NativeArray<T> Samples(int sampleCount, out JobHandle jobHandle)
    Parameters
    Type Name Description
    Int32 sampleCount

    Number of parameter samples to generate

    JobHandle jobHandle

    The JobHandle returned from scheduling the sampling job

    Returns
    Type Description
    NativeArray<T>

    A NativeArray containing generated samples

    Validate()

    Validate the settings of this parameter

    Declaration
    public override void Validate()
    Overrides
    Parameter.Validate()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023