====== Workflow ====== ==== 2, Make an UI Holder(Panel) ==== === Part1 === - Add an new ui panel type which refer to an ui panle category onto UIHandler.cs - public enum UIPanelType { /// /// Basic = 101 /// Global = 200 /// Map = 1000 /// Battle = 2000 /// None = 0, //Basic --------------------------------------------------- [UIPrefabDesc("UI_DialogBG_A_0", UIPanelClass.Basic)] [UIPrefabDesc("UI_DialogBG_A_25", UIPanelClass.Basic)] [UIPrefabDesc("UI_DialogBG_Nomal_75", UIPanelClass.Basic)] DialogBG = 51, [UIPrefabDesc("UI_CheckDialog", UIPanelClass.Dlg, UIEnum_DlgBG.Normal)] CheckDialog = 52, ... ... [UIPrefabDesc("UI_Samples", UIPanelClass.Test)] Samples = 10000, } - Update the uiscenedefault.txt with setting current panel as the original scene's default ui * {{:1_guide:1_guide_2_makeholder_1.png?450}} - Update the uilayerpanel.txt * {{:1_guide:1_guide_2_makeholder_2.png?450}} * For example, the DefaultInfo panel will set Root_General2 as its parent transform(The default root for panels is Root_General){{:1_guide:1_guide_2_makeholder_3.png?450}} === Part2 === - Create a binder script. - Create a handler script which is partical class. * {{:1_guide:1_guide_2_makeholder_4.png?250}} * {{:1_guide:1_guide_2_makeholder_6.png?400}} - Make a prefab with the UIHolder component addon, then put it under a Resources folder. * It should be like this. * {{:1_guide:1_guide_2_makeholder_5.png?500}} Run the entry.unity and you will see the ui panels made just now. * Make sure the StartGameState is Test. * {{:1_guide:1_guide_9.png?500}}