private void Awake() { m_instance = this; m_controlContainer = GetComponent <UIComponent>(); m_controlContainer.name = "SSPanel"; m_controlContainer.isInteractive = false; var lateralListWidth = 180; KlyteUtils.createUIElement(out UIPanel _mainPanel, GetComponent <UIPanel>().transform, "SSListPanel", new Vector4(0, 0, m_controlContainer.width, m_controlContainer.height)); MainPanel = _mainPanel; MainPanel.backgroundSprite = "MenuPanel2"; CreateTitleBar(); KlyteUtils.CreateScrollPanel(_mainPanel, out m_profileList, out UIScrollbar scrollbar, lateralListWidth, m_controlContainer.height - 110, new Vector3(10, 100)); KlyteUtils.createUIElement(out m_tabstripCategories, MainPanel.transform, "SSTabstrip", new Vector4(lateralListWidth + 30, 50, MainPanel.width - 340, 40)); KlyteUtils.createUIElement(out UITabContainer tabContainer, MainPanel.transform, "SSTabContainer", new Vector4(lateralListWidth + 30, 90, MainPanel.width - 350, MainPanel.height - 90)); m_tabstripCategories.tabPages = tabContainer; UIButton tabTrees = CreateTabTemplate(); KlyteUtils.createUIElement(out UIPanel containerTrees, null); containerTrees.area = new Vector4(0, 0, tabContainer.width, tabContainer.height); containerTrees.backgroundSprite = "MainPanelInfo"; containerTrees.color = Color.gray; List <Type> tabs = KlyteUtils.GetSubtypesRecursive(typeof(SSDecorationTab <,>), GetType()); foreach (var tab in tabs) { m_tabstripCategories.AddTab(tab.Name, tabTrees.gameObject, containerTrees.gameObject); var tabController = (SSDecorationTab)containerTrees.gameObject.AddComponent(tab); tabTrees.normalFgSprite = tabController.TabIcon; tabTrees.tooltipLocaleID = tabController.TabDescriptionLocale; tabTrees.isTooltipLocalized = true; } m_tabstripCategories.selectedIndex = -1; }