using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.Perception.Randomization.Samplers;
namespace UnityEngine.Experimental.Perception.Randomization.Parameters
{
///
/// Parameters, in conjunction with a parameter configuration, are used to create convenient interfaces for
/// randomizing simulations.
///
[Serializable]
public abstract class Parameter
{
[HideInInspector, SerializeField] internal bool collapsed;
///
/// The sample type generated by this parameter
///
public abstract Type sampleType { get; }
///
/// Returns an IEnumerable that iterates over each sampler field in this parameter
///
internal abstract IEnumerable samplers { get; }
///
/// Returns the display name of a parameter type
///
/// A subclass of Parameter
/// The parameter type's display name
public static string GetDisplayName(Type type)
{
return type.Name.Replace("Parameter", "");
}
///
/// Generates a generic sample
///
/// The generated sample
public abstract object GenericSample();
///
/// Validates parameter settings
///
public virtual void Validate() { }
}
}