Class NumericParameter<T>
Numeric parameters use samplers to generate randomized structs
Inherited Members
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
Methods
GenericSample()
Generates a generic sample
Declaration
public override object GenericSample()
Returns
Type | Description |
---|---|
Object | The generated sample |
Overrides
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()