Singularity/Library/PackageCache/com.unity.visualscripting@1.../Editor/VisualScripting.State/Transitions/StateTransitionDescriptor.cs

42 lines
970 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
namespace Unity.VisualScripting
{
public abstract class StateTransitionDescriptor<TStateTransition> : Descriptor<TStateTransition, StateTransitionDescription>
where TStateTransition : class, IStateTransition
{
protected StateTransitionDescriptor(TStateTransition target) : base(target) { }
public TStateTransition transition => target;
[Assigns]
public override string Title()
{
return "Transition";
}
[Assigns]
public override string Summary()
{
return null;
}
[Assigns]
public virtual string Label()
{
return Title();
}
[Assigns]
public virtual string Tooltip()
{
return Summary();
}
[Assigns]
[RequiresUnityAPI]
public override EditorTexture Icon()
{
return typeof(IStateTransition).Icon();
}
}
}