editor: 编辑器微调
This commit is contained in:
@@ -403,7 +403,7 @@ namespace AibisDream.FrameAnimation.Editor
|
||||
|
||||
public static string MakeUniqueFlowId(FrameAnimationGraph graph, AnimationNode node)
|
||||
{
|
||||
var root = (string.IsNullOrWhiteSpace(node?.DisplayName) ? "Animation" : node.DisplayName) + "Flow";
|
||||
var root = (string.IsNullOrWhiteSpace(node?.DisplayName) ? "Animation" : node.DisplayName) + "_Flow";
|
||||
var candidate = root;
|
||||
var suffix = 2;
|
||||
while (!FrameAnimationAssetOperations.IsPlayableIdAvailable(graph, candidate))
|
||||
|
||||
@@ -92,10 +92,10 @@ namespace AibisDream.FrameAnimation.Tests.EditMode
|
||||
{
|
||||
var entry = AddNode("entry", "Idle");
|
||||
var other = AddNode("other", "Idle");
|
||||
Assert.That(FrameAnimationGraphMutationService.MakeUniqueFlowId(graph, entry), Is.EqualTo("IdleFlow"));
|
||||
Assert.That(FrameAnimationGraphMutationService.MakeUniqueFlowId(graph, entry), Is.EqualTo("Idle_Flow"));
|
||||
Assert.That(FrameAnimationGraphMutationService.CreateFlow(
|
||||
graph, entry, "IdleFlow", "Idle", out var flow, out var error), Is.True, error);
|
||||
Assert.That(FrameAnimationGraphMutationService.MakeUniqueFlowId(graph, other), Is.EqualTo("IdleFlow2"));
|
||||
graph, entry, "Idle_Flow", "Idle", out var flow, out var error), Is.True, error);
|
||||
Assert.That(FrameAnimationGraphMutationService.MakeUniqueFlowId(graph, other), Is.EqualTo("Idle_Flow2"));
|
||||
Assert.That(FrameAnimationGraphMutationService.CreateFlow(
|
||||
graph, entry, "OtherFlow", "Other", out _, out error), Is.False);
|
||||
StringAssert.Contains("入口", error);
|
||||
|
||||
Reference in New Issue
Block a user