Class BooleanParameter | Perception | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class BooleanParameter

    A numeric parameter for generating boolean samples

    Inheritance
    Object
    Parameter
    NumericParameter<Boolean>
    BooleanParameter
    Inherited Members
    NumericParameter<Boolean>.sampleType
    NumericParameter<Boolean>.GenericSample()
    NumericParameter<Boolean>.Validate()
    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 class BooleanParameter : NumericParameter<bool>

    Fields

    threshold

    A threshold value that transforms random values within the range [0, 1] to boolean values. Values greater than the threshold are true, and values less than the threshold are false.

    Declaration
    [Range(0F, 1F)]
    public float threshold
    Field Value
    Type Description
    Single

    value

    The sampler used as a source of random values for this parameter

    Declaration
    [HideInInspector]
    [SerializeReference]
    public ISampler value
    Field Value
    Type Description
    ISampler

    Methods

    Sample()

    Generates a boolean sample

    Declaration
    public override bool Sample()
    Returns
    Type Description
    Boolean

    The generated sample

    Overrides
    UnityEngine.Experimental.Perception.Randomization.Parameters.NumericParameter<System.Boolean>.Sample()

    Samples(Int32, out JobHandle)

    Schedules a job to generate an array of samples

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

    The number of samples to generate

    JobHandle jobHandle

    The handle of the scheduled job

    Returns
    Type Description
    NativeArray<Boolean>

    A NativeArray of samples

    Overrides
    UnityEngine.Experimental.Perception.Randomization.Parameters.NumericParameter<System.Boolean>.Samples(System.Int32, Unity.Jobs.JobHandle)
    In This Article
    • Fields
      • threshold
      • value
    • Methods
      • Sample()
      • Samples(Int32, out JobHandle)
    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