@@ -68,77 +68,34 @@ GameFrameX UI FairyGUI is a Unity UI adapter that wraps the [FairyGUI](https://w
6868
6969### Installation
7070
71- Choose one of the following methods:
72-
73- ** Method 1: manifest.json**
74-
75- Add the following to your project's ` Packages/manifest.json ` under ` dependencies ` :
71+ Edit your Unity project's ` Packages/manifest.json ` and add the ` scopedRegistries ` section:
7672
7773``` json
7874{
79- "com.gameframex.unity.ui.fairygui" : " https://github.com/AlianBlank/com.gameframex.unity.ui.fairygui.git"
75+ "scopedRegistries" : [
76+ {
77+ "name" : " GameFrameX" ,
78+ "url" : " https://gameframex.upm.alianblank.uk" ,
79+ "scopes" : [
80+ " com.gameframex"
81+ ]
82+ }
83+ ]
8084}
8185```
8286
83- ** Method 2: Unity Package Manager (Git URL)**
84-
85- Open Unity Package Manager → Add package from git URL:
86-
87- ```
88- https://github.com/gameframex/com.gameframex.unity.ui.fairygui.git
89- ```
90-
91- ** Method 3: Manual**
92-
93- Download the repository and place it in your Unity project's ` Packages/ ` directory. Unity will auto-detect it.
94-
95- ### Dependencies
96-
97- | Package | Version | Description |
98- | ---------| ---------| -------------|
99- | ` com.gameframex.unity ` | ≥ 1.1.1 | Core framework runtime |
100- | ` com.gameframex.unity.ui ` | ≥ 1.0.0 | Base UI abstraction layer |
101- | ` com.gameframex.unity.asset ` | ≥ 1.0.6 | Asset loading system |
102- | ` com.gameframex.unity.event ` | ≥ 1.0.0 | Event system |
103- | FairyGUI Runtime | — | FairyGUI library |
104- | YooAsset | — | Asset management |
105- | UniTask | — | Async/await support |
106-
107- ### Basic Usage
108-
109- 1 . ** Add ` FairyGUIPackageComponent ` ** to your scene (via ` GameFrameX → FairyGUIPackage ` menu)
87+ ` scopes ` controls which packages are resolved through this registry. Only packages whose names start with ` com.gameframex ` will be fetched from it.
11088
111- 2 . ** Create a UI panel ** by inheriting from ` FUI ` :
89+ Then add the package to ` dependencies ` :
11290
113- ``` csharp
114- using GameFrameX .UI .FairyGUI .Runtime ;
115-
116- [OptionUIGroup (" Default" )]
117- public class MyPanel : FUI
91+ ``` json
11892{
119- protected override void OnInit ()
120- {
121- // Initialize UI elements
122- }
123-
124- protected override void OnOpen (object userData )
125- {
126- // Handle open logic
127- }
128-
129- protected override void OnClose ()
130- {
131- // Handle close logic
132- }
93+ "dependencies" : {
94+ "com.gameframex.unity.ui.fairygui" : " 3.3.2"
95+ }
13396}
13497```
13598
136- 3 . ** Open the panel** through the framework's UI component:
137-
138- ``` csharp
139- // Open a UI panel asynchronously
140- await GameEntry .GetComponent <UIComponent >().OpenUIFormAsync (" MyPackage" , " MyPanel" );
141- ```
14299
143100## Usage Examples
144101
0 commit comments