Workflow

2, Make an UI Holder(Panel)

Part1

  1. Add an new ui panel type which refer to an ui panle category onto UIHandler.cs
    1. public enum UIPanelType {
      	/// <summary>
      	/// Basic  = 101
      	/// Global = 200
      	/// Map    = 1000
      	/// Battle = 2000
      	/// </summary>
       
      	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,
      }
  2. Update the uiscenedefault.txt with setting current panel as the original scene's default ui
  3. Update the uilayerpanel.txt
    • For example, the DefaultInfo panel will set Root_General2 as its parent transform(The default root for panels is Root_General)

Part2

  1. Create a binder script.
  2. Create a handler script which is partical class.
  3. Make a prefab with the UIHolder component addon, then put it under a Resources folder.
    • It should be like this.

Run the entry.unity and you will see the ui panels made just now.