// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
using System;
namespace Animancer
{
/// [Editor-Conditional] Specifies the default value of a field and a secondary fallback.
/// https://kybernetik.com.au/animancer/api/Animancer/DefaultValueAttribute
[AttributeUsage(AttributeTargets.Field)]
[System.Diagnostics.Conditional(Strings.UnityEditor)]
public class DefaultValueAttribute : Attribute
{
/************************************************************************************************************************/
/// The main default value.
public virtual object Primary { get; protected set; }
/************************************************************************************************************************/
/// The fallback value to use if the target value was already equal to the .
public virtual object Secondary { get; protected set; }
/************************************************************************************************************************/
/// Creates a new .
public DefaultValueAttribute(object primary, object secondary = null)
{
Primary = primary;
Secondary = secondary;
}
/************************************************************************************************************************/
/// Creates a new .
protected DefaultValueAttribute() { }
/************************************************************************************************************************/
}
}