From ea355dd560f5757e07d4e009d34ebdde61ce6eed Mon Sep 17 00:00:00 2001 From: Nils Hausfeld Date: Fri, 6 Oct 2023 15:30:52 +0200 Subject: [PATCH] - Title of Animation sample node gets updated when connection of animation reference box changes --- Source/Editor/Surface/Archetypes/Animation.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Surface/Archetypes/Animation.cs b/Source/Editor/Surface/Archetypes/Animation.cs index 2e362ae79..2155b014e 100644 --- a/Source/Editor/Surface/Archetypes/Animation.cs +++ b/Source/Editor/Surface/Archetypes/Animation.cs @@ -68,7 +68,7 @@ namespace FlaxEditor.Surface.Archetypes private void UpdateTitle() { var asset = Editor.Instance.ContentDatabase.Find((Guid)Values[0]); - Title = asset?.ShortName ?? "Animation"; + Title = _assetBox.HasAnyConnection || asset == null ? "Animation" : asset.ShortName; var style = Style.Current; Resize(Mathf.Max(230, style.FontLarge.MeasureText(Title).X + 30), 160); } @@ -82,6 +82,7 @@ namespace FlaxEditor.Surface.Archetypes return; _assetSelect.Visible = !box.HasAnyConnection; + UpdateTitle(); } }