editor: 编辑器微调

This commit is contained in:
2026-07-22 00:06:59 +08:00
parent 9f61f53b7f
commit 3891b6bd37
2 changed files with 4 additions and 4 deletions
@@ -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);