// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
#if UNITY_EDITOR
using UnityEditor;
namespace Animancer.Editor
{
/// [Editor-Only] A custom GUI for .
/// https://kybernetik.com.au/animancer/api/Animancer.Editor/WeightedMaskLayersFadeDrawer
[CustomGUI(typeof(WeightedMaskLayers.Fade))]
public class WeightedMaskLayersFadeDrawer : CustomGUI
{
/************************************************************************************************************************/
private bool _IsExpanded;
/************************************************************************************************************************/
///
public override void DoGUI()
{
_IsExpanded = EditorGUILayout.Foldout(_IsExpanded, "Weighted Mask Layers Fade", true);
if (_IsExpanded)
DoDetailsGUI();
}
/************************************************************************************************************************/
/// Draws the GUI for the target's fields.
protected virtual void DoDetailsGUI()
{
EditorGUI.indentLevel++;
Value.ElapsedTime = EditorGUILayout.Slider("Elapsed", Value.ElapsedTime, 0, Value.Duration);
Value.Duration = EditorGUILayout.FloatField("Duration", Value.Duration);
EditorGUI.indentLevel--;
}
/************************************************************************************************************************/
}
}
#endif