using System; using System.Reflection; namespace UnityEngine.AzureSky { [Serializable] public sealed class AzureWeatherProperty { /// The name of this weather property. public string name { get => m_name; set => m_name = value; } [SerializeField] private string m_name = "MyPropertyName"; /// The type in which this weather property will be displayed in weather profiles for customization. public AzureWeatherPropertyType propertyType { get => m_propertyType; set => m_propertyType = value; } [SerializeField] private AzureWeatherPropertyType m_propertyType = AzureWeatherPropertyType.Float; /// The min value allowed in case the weather property is a float. public float minValue { get => m_minValue; set => m_minValue = value; } [SerializeField] private float m_minValue = 0.0f; /// The max value allowed in case the weather property is a float. public float maxValue { get => m_maxValue; set => m_maxValue = value; } [SerializeField] private float m_maxValue = 1.0f; /// The default float value used when a new weather preset is created. public float defaultFloatValue { get => m_defaultFloatValue; set => m_defaultFloatValue = value; } [SerializeField] private float m_defaultFloatValue = 0.0f; /// The default color value used when a new weather preset is created. public Color defaultColorValue { get => m_defaultColorValue; set => m_defaultColorValue = value; } [SerializeField] private Color m_defaultColorValue = Color.white; /// The default curve value used when a new weather preset is created. public AnimationCurve defaultCurveValue { get => m_defaultCurveValue; set => m_defaultCurveValue = value; } [SerializeField] private AnimationCurve m_defaultCurveValue = AnimationCurve.Linear(0f, 0.5f, 24f, 0.5f); /// The default gradient value used when a new weather preset is created. public Gradient defaultGradientValue { get => m_defaultGradientValue; set => m_defaultGradientValue = value; } [SerializeField] private Gradient m_defaultGradientValue = new Gradient(); /// The default vector value used when a new weather preset is created. public Vector3 defaultVector3Value { get => m_defaultVector3Value; set => m_defaultVector3Value = value; } [SerializeField] private Vector3 m_defaultVector3Value = Vector3.zero; /// Enables or disables the override feature of this weather property. public AzureWeatherPropertyOverrideMode overrideMode { get => m_overrideMode; set => m_overrideMode = value; } [SerializeField] private AzureWeatherPropertyOverrideMode m_overrideMode = AzureWeatherPropertyOverrideMode.Off; /// The type of the target this weather property is going to overwrite. public AzureWeatherPropertyTargetType targetType { get => m_targetType; set => m_targetType = value; } [SerializeField] private AzureWeatherPropertyTargetType m_targetType = AzureWeatherPropertyTargetType.Property; /// The global target type to access and get the global target property that will be overridden. public Type targetGlobalType { get => m_targetGlobalType; set => m_targetGlobalType = value; } [SerializeField] private Type m_targetGlobalType; /// The target game object to access and get the target component. public GameObject targetObject { get => m_targetObject; set => m_targetObject = value; } [SerializeField] private GameObject m_targetObject; /// The target component to access and get the target property. public Component targetComponent { get => m_targetComponent; set => m_targetComponent = value; } [SerializeField] private Component m_targetComponent; /// The target material to access and set the target property. public Material targetMaterial { get => m_targetMaterial; set => m_targetMaterial = value; } [SerializeField] private Material m_targetMaterial; /// Stores the name used to get the target component. public string targetComponentName { get => m_targetComponentName; set => m_targetComponentName = value; } [SerializeField] private string m_targetComponentName; /// Stores the name used to get the target property. public string targetPropertyName { get => m_targetPropertyName; set => m_targetPropertyName = value; } [SerializeField] private string m_targetPropertyName; /// The field info that stores the target property field. public FieldInfo fieldInfo { get => m_fieldInfo; set => m_fieldInfo = value; } private FieldInfo m_fieldInfo; /// The property info that stores the target property. public PropertyInfo propertyInfo { get => m_propertyInfo; set => m_propertyInfo = value; } private PropertyInfo m_propertyInfo; /// The float output of this weather property after performing the blend transition. public float floatOutput { get => m_floatOutput; set => m_floatOutput = value; } private float m_floatOutput; /// The color output of this weather property after performing the blend transition. public Color colorOutput { get => m_colorOutput; set => m_colorOutput = value; } private Color m_colorOutput; /// The vector output of this weather property after performing the blend transition. public Vector3 vector3Output { get => m_vector3Output; set => m_vector3Output = value; } private Vector3 m_vector3Output; ///// Constructor. //public AzureWeatherProperty() //{ // m_name = "MyPropertyName"; //} } }