1_guide:2_makeholder
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 1_guide:2_makeholder [2017/06/22 04:52] – external edit 127.0.0.1 | 1_guide:2_makeholder [2024/06/18 13:42] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Workflow ====== | ====== Workflow ====== | ||
| - | ==== 2, Make UI Holder/Panel ==== | + | ==== 2, Make an UI Holder(Panel) ==== |
| === Part1 === | === Part1 === | ||
| - Add an new ui panel type which refer to an ui panle category onto UIHandler.cs | - Add an new ui panel type which refer to an ui panle category onto UIHandler.cs | ||
| + | - <code c#> | ||
| + | /// < | ||
| + | /// Basic = 101 | ||
| + | /// Global = 200 | ||
| + | /// Map = 1000 | ||
| + | /// Battle = 2000 | ||
| + | /// </ | ||
| + | |||
| + | None = 0, | ||
| + | |||
| + | //Basic --------------------------------------------------- | ||
| + | [UIPrefabDesc(" | ||
| + | [UIPrefabDesc(" | ||
| + | [UIPrefabDesc(" | ||
| + | DialogBG = 51, | ||
| + | [UIPrefabDesc(" | ||
| + | CheckDialog = 52, | ||
| + | ... | ||
| + | ... | ||
| + | [UIPrefabDesc(" | ||
| + | Samples = 10000, | ||
| + | }</ | ||
| - Update the uiscenedefault.txt with setting current panel as the original scene' | - Update the uiscenedefault.txt with setting current panel as the original scene' | ||
| + | * {{: | ||
| - Update the uilayerpanel.txt | - 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 === | === Part2 === | ||
| - | - Create a binder script | + | - Create a binder script. |
| - Create a handler script which is partical class. | - Create a handler script which is partical class. | ||
| + | * {{: | ||
| + | * {{: | ||
| - Make a prefab with the UIHolder component addon, then put it under a Resources folder. | - 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. | Run the entry.unity and you will see the ui panels made just now. | ||
| + | * Make sure the StartGameState is Test. | ||
| + | * {{: | ||
1_guide/2_makeholder.1498107150.txt.gz · Last modified: 2024/06/18 13:44 (external edit)
