feat: 패시브 트리 레이아웃 자동화 및 UI 정리

- 패시브 트리 노드 배치를 삼각형 기반 자동 배치 구조로 전환하고 축 및 브릿지 반경을 재정리\n- 패시브 UI 프리팹과 런타임 렌더링을 수정해 노드 겹침, 링크 관통, 상태별 간격 변화, 하단 여백 문제를 정리\n- 프로토타입 패시브 노드, 트리, 프리셋 자산을 재생성해 최신 레이아웃과 확장 노드 구성을 반영
This commit is contained in:
2026-03-27 04:43:14 +09:00
parent 786a38d72d
commit d78e0edabd
45 changed files with 5228 additions and 6276 deletions

View File

@@ -35,6 +35,7 @@ namespace Colosseum.Editor
private static readonly Color ButtonColor = new(0.20f, 0.20f, 0.24f, 0.96f);
private static readonly Color TextColor = new(0.90f, 0.88f, 0.82f, 1f);
private static readonly Color NodeColor = new(0.16f, 0.16f, 0.18f, 0.98f);
private static readonly Color NodeFillColor = new(0.08f, 0.08f, 0.10f, 0.98f);
private static readonly Color NodeOutlineColor = new(0f, 0f, 0f, 0.45f);
[MenuItem("Tools/Colosseum/Passives/Rebuild Passive UI Prefabs")]
@@ -71,7 +72,7 @@ namespace Colosseum.Editor
try
{
RectTransform rect = root.GetComponent<RectTransform>();
rect.sizeDelta = new Vector2(70f, 70f);
rect.sizeDelta = new Vector2(62f, 62f);
Image background = root.GetComponent<Image>();
background.sprite = LoadPassiveNodeSprite(false);
@@ -86,11 +87,23 @@ namespace Colosseum.Editor
Button button = root.GetComponent<Button>();
button.targetGraphic = background;
GameObject fillObject = CreateUiObject("Fill", root.transform, typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
RectTransform fillRect = fillObject.GetComponent<RectTransform>();
StretchRect(fillRect);
fillRect.offsetMin = new Vector2(17f, 17f);
fillRect.offsetMax = new Vector2(-17f, -17f);
Image fillImage = fillObject.GetComponent<Image>();
fillImage.sprite = GetBuiltinSprite();
fillImage.type = Image.Type.Sliced;
fillImage.color = NodeFillColor;
fillImage.raycastTarget = false;
GameObject innerObject = CreateUiObject("InnerIcon", root.transform, typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
RectTransform innerRect = innerObject.GetComponent<RectTransform>();
StretchRect(innerRect);
innerRect.offsetMin = new Vector2(10f, 10f);
innerRect.offsetMax = new Vector2(-10f, -10f);
innerRect.offsetMin = new Vector2(9f, 9f);
innerRect.offsetMax = new Vector2(-9f, -9f);
Image innerImage = innerObject.GetComponent<Image>();
innerImage.sprite = LoadPassiveNodeSprite(false);
@@ -102,6 +115,7 @@ namespace Colosseum.Editor
PassiveTreeNodeView references = root.GetComponent<PassiveTreeNodeView>();
SetSerializedReference(references, "rootRect", rect);
SetSerializedReference(references, "backgroundImage", background);
SetSerializedReference(references, "fillImage", fillImage);
SetSerializedReference(references, "innerImage", innerImage);
SetSerializedReference(references, "button", button);
SetSerializedReference(references, "outline", outline);
@@ -143,7 +157,7 @@ namespace Colosseum.Editor
panelRect.anchorMin = new Vector2(0.5f, 0.5f);
panelRect.anchorMax = new Vector2(0.5f, 0.5f);
panelRect.pivot = new Vector2(0.5f, 0.5f);
panelRect.sizeDelta = new Vector2(1380f, 820f);
panelRect.sizeDelta = new Vector2(1440f, 900f);
Image panelImage = panelObject.GetComponent<Image>();
panelImage.sprite = GetBuiltinSprite();
@@ -308,14 +322,14 @@ namespace Colosseum.Editor
RectTransform graphSection = CreateSectionRoot(bodyObject.transform, "Section_Graph", 0f);
graphSection.GetComponent<LayoutElement>().flexibleWidth = 1f;
graphSection.GetComponent<LayoutElement>().minWidth = 760f;
graphSection.GetComponent<LayoutElement>().minWidth = 820f;
CreateSectionTitle(graphSection, "트리 그래프");
GameObject graphSurface = CreateUiObject("GraphSurface", graphSection, typeof(RectTransform), typeof(LayoutElement), typeof(Image));
graphRect = graphSurface.GetComponent<RectTransform>();
LayoutElement graphLayout = graphSurface.GetComponent<LayoutElement>();
graphLayout.flexibleHeight = 1f;
graphLayout.minHeight = 560f;
graphLayout.minHeight = 640f;
Image graphImage = graphSurface.GetComponent<Image>();
graphImage.sprite = GetBuiltinSprite();
@@ -385,7 +399,7 @@ namespace Colosseum.Editor
statusText.text = string.Empty;
statusText.textWrappingMode = TextWrappingModes.NoWrap;
statusText.overflowMode = TextOverflowModes.Ellipsis;
footerObject.SetActive(false);
footerObject.SetActive(true);
}
private static RectTransform CreateSectionRoot(Transform parent, string name, float preferredWidth)