mathe/Library/PackageCache/com.unity.visualscripting@1.9.0/Editor/VisualScripting.State/Transitions/StateTransitionDescriptor.cs
2024-09-20 20:30:10 +02:00

42 lines
970 B
C#

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();
}
}
}