Files
XRLib/Assets/Scripts/Studio/StudioSideTabBar.cs

48 lines
1.3 KiB
C#
Raw Normal View History

2025-09-25 19:58:30 +09:00
#nullable enable
2025-12-08 21:06:05 +09:00
using System.Collections.Generic;
using System.Linq;
2025-09-25 19:58:30 +09:00
using UnityEngine;
using UnityEngine.EventSystems;
using UVC.Core;
2025-12-08 21:06:05 +09:00
using UVC.UI.List.ComponentList;
2025-09-25 19:58:30 +09:00
using UVC.UI.Tab;
2025-12-11 21:05:44 +09:00
namespace UVC.Studio
2025-09-25 19:58:30 +09:00
{
2025-12-15 20:17:38 +09:00
public class StudioSideTabBar : MonoBehaviour
2025-09-25 19:58:30 +09:00
{
[SerializeField]
private TabController? tabController;
2025-12-15 20:17:38 +09:00
private void Awake()
2025-09-25 19:58:30 +09:00
{
if (tabController == null)
{
Debug.LogError("SideTabBar: TabController가 할당되지 않았습니다.");
return;
}
}
2025-12-08 21:06:05 +09:00
public void InitTab()
2025-09-25 19:58:30 +09:00
{
// 1. TabConfig 설정
tabController?.AddTabConfig("Explorer", "Explorer", "Studio/Prefabs/Tab/StudioSideTabBarHierarchy", "Prefabs/UI/Images/icon_side_tab_explorer_24", "Explorer", false);
tabController?.AddTabConfig("Library", "Library", "Studio/Prefabs/Tab/StudioSideTabBarAccordion", "Prefabs/UI/Images/icon_side_tab_library_24", "Library", false);
2025-09-25 19:58:30 +09:00
// 2. 컨트롤러 초기화
tabController?.Initialize();
if (tabController != null)
{
tabController.OnTabChanged += (index) =>
{
Debug.Log($"탭이 변경되었습니다: {index}");
};
}
}
}
}