48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
#nullable enable
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UVC.Core;
|
|
using UVC.UI.List.ComponentList;
|
|
using UVC.UI.Tab;
|
|
|
|
namespace UVC.Studio
|
|
{
|
|
public class StudioSideTabBar : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private TabController? tabController;
|
|
|
|
private void Awake()
|
|
{
|
|
if (tabController == null)
|
|
{
|
|
Debug.LogError("SideTabBar: TabController가 할당되지 않았습니다.");
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void InitTab()
|
|
{
|
|
// 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);
|
|
|
|
// 2. 컨트롤러 초기화
|
|
tabController?.Initialize();
|
|
|
|
if (tabController != null)
|
|
{
|
|
tabController.OnTabChanged += (index) =>
|
|
{
|
|
Debug.Log($"탭이 변경되었습니다: {index}");
|
|
};
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|