/// Some Randomizers should not be disabled by the user as they are critical to the project. E.g. We might want to mark this as false for a foreground objects placement randomizer in some projects
/// </summary>
#if !SCENARIO_CONFIG_POWER_USER
[HideInInspector]
#endif
publicboolcanBeDisabledByUser=true;
/// <summary>
/// Returns the scenario containing this Randomizer
[Tooltip("Probability distribution curve used for this sampler. The X axis corresponds to the values this sampler will pick from, and the Y axis corresponds to the relative probability of the values. The relative probabilities (Y axis) do not need to max out at 1 as only the shape of the curve matters. The Y values cannot however be negative.")]
publicAnimationCurvedistributionCurve;
publicvoidCheckAgainstValidRange()
{
thrownewNotImplementedException();
//no range check currently performed for this sampler
}
///<inheritdoc/>
[field: HideInInspector]
[field: SerializeField]
publicfloatminAllowed{get;set;}
///<inheritdoc/>
[field: HideInInspector]
[field: SerializeField]
publicfloatmaxAllowed{get;set;}
///<inheritdoc/>
[field: HideInInspector]
[field: SerializeField]
publicboolshouldCheckValidRange{get;set;}
/// <summary>
/// Number of samples used for integrating over the provided AnimationCurve.
/// <param name="value">The value from which samples will be generated</param>
publicConstantSampler(floatvalue)
/// <param name="shouldCheckValidRange">Whether the provided <see cref="minAllowed"/> and <see cref="maxAllowed"/> values should be used to validate the <see cref="value"/> provided</param>
/// <param name="minAllowed">The smallest min value allowed for this range</param>
/// <param name="maxAllowed">The largest max value allowed for this range</param>
/// <param name="mean">The mean of the normal distribution to sample from</param>
/// <param name="standardDeviation">The standard deviation of the normal distribution to sample from</param>
/// <param name="shouldCheckValidRange">Whether the provided <see cref="minAllowed"/> and <see cref="maxAllowed"/> values should be used to validate the range provided with <see cref="minimum"/> and <see cref="maximum"/></param>
/// <param name="minAllowed">The smallest min value allowed for this range</param>
/// <param name="maxAllowed">The largest max value allowed for this range</param>
/// A range bounding the values generated by this sampler
/// </summary>
publicFloatRangerange;
///<inheritdoc/>
#if !SCENARIO_CONFIG_POWER_USER
[field: HideInInspector]
#endif
[field: SerializeField]
publicfloatminAllowed{get;set;}
///<inheritdoc/>
#if !SCENARIO_CONFIG_POWER_USER
[field: HideInInspector]
#endif
[field: SerializeField]
publicfloatmaxAllowed{get;set;}
///<inheritdoc/>
#if !SCENARIO_CONFIG_POWER_USER
[field: HideInInspector]
#endif
[field: SerializeField]
publicboolshouldCheckValidRange{get;set;}
/// <summary>
/// Constructs a UniformSampler
/// </summary>
/// <param name="min">The smallest value contained within the range</param>
/// <param name="max">The largest value contained within the range</param>
publicUniformSampler(floatmin,floatmax)
/// <param name="shouldCheckValidRange">Whether the provided <see cref="minAllowed"/> and <see cref="maxAllowed"/> values should be used to validate the range provided with <see cref="minimum"/> and <see cref="maximum"/></param>
/// <param name="minAllowed">The smallest min value allowed for this range</param>
/// <param name="maxAllowed">The largest max value allowed for this range</param>
Debug.LogError($"The provided value for the field \"{field.Name}\" of \"{obj.GetType().Name}\" exceeds the allowed valid range. Clamping to valid range.");