All-in-One Solution for Indie Game Development ยท Empowering Indie Developers' Dreams
๐ Documentation โข ๐ Quick Start โข ๐ฌ QQ Group: 612311526
๐ Language: English | ็ฎไฝไธญๆ | ็น้ซไธญๆ | ๆฅๆฌ่ช | ํ๊ตญ์ด
GameFrameX UI FairyGUI is a Unity UI adapter that wraps the FairyGUI framework into the GameFrameX modular game framework. It provides complete UI lifecycle management (open/close/recycle/animate) with async asset loading via YooAsset.
- Complete UI Lifecycle โ Open, close, recycle, and animate UI forms with a unified API
- Async Asset Loading โ YooAsset-backed async loading for FairyGUI packages and resources
- Object Pooling โ UI form instances are pooled for reuse, minimizing GC allocations
- Singleton Deduplication โ Automatically prevents duplicate form creation
- Loading Queue โ Coalesces concurrent open requests for the same form
- Attribute-Driven Configuration โ Control UI groups, show/hide animations via C# attributes
- MVVM Binding Support โ Automatic cleanup of bindable property events with
BindablePropertyExtension - Dual Asset Loading โ Supports both
Resources.Loadand YooAsset AssetBundle loading - IL2CPP Safe โ Preserve attributes prevent code stripping on IL2CPP builds
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your UI Panels (FUI) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ UIManager โ
โ (Open / Close / Recycle / Loading Queue) โ
โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโค
โ FormHelperโUIGroup โ PackageComponent โ
โ (Create/ โHelper โ (AddPackage / โ
โ Release) โ(Depth) โ RemovePackage) โ
โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโค
โ FairyGUI Runtime + YooAsset โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Component | Description |
|---|---|
UIManager |
Central UI manager handling open/close/recycle lifecycle |
FUI |
Base class for all FairyGUI panels โ inherit from this |
FairyGUIPackageComponent |
MonoBehaviour managing FairyGUI package loading/unloading |
FairyGUIFormHelper |
Handles form instantiation, creation, and release |
FairyGUIUIGroupHelper |
Manages UI group depth and layering |
FairyGUILoadAsyncResourceHelper |
Bridges FairyGUI resource requests to YooAsset |
FairyGUIPathFinderHelper |
Path-based GObject lookup utility |
Choose one of the following methods:
Method 1: manifest.json
Add the following to your project's Packages/manifest.json under dependencies:
{
"com.gameframex.unity.ui.fairygui": "https://github.com/AlianBlank/com.gameframex.unity.ui.fairygui.git"
}Method 2: Unity Package Manager (Git URL)
Open Unity Package Manager โ Add package from git URL:
https://github.com/gameframex/com.gameframex.unity.ui.fairygui.git
Method 3: Manual
Download the repository and place it in your Unity project's Packages/ directory. Unity will auto-detect it.
| Package | Version | Description |
|---|---|---|
com.gameframex.unity |
โฅ 1.1.1 | Core framework runtime |
com.gameframex.unity.ui |
โฅ 1.0.0 | Base UI abstraction layer |
com.gameframex.unity.asset |
โฅ 1.0.6 | Asset loading system |
com.gameframex.unity.event |
โฅ 1.0.0 | Event system |
| FairyGUI Runtime | โ | FairyGUI library |
| YooAsset | โ | Asset management |
| UniTask | โ | Async/await support |
-
Add
FairyGUIPackageComponentto your scene (viaGameFrameX โ FairyGUIPackagemenu) -
Create a UI panel by inheriting from
FUI:
using GameFrameX.UI.FairyGUI.Runtime;
[OptionUIGroup("Default")]
public class MyPanel : FUI
{
protected override void OnInit()
{
// Initialize UI elements
}
protected override void OnOpen(object userData)
{
// Handle open logic
}
protected override void OnClose()
{
// Handle close logic
}
}- Open the panel through the framework's UI component:
// Open a UI panel asynchronously
await GameEntry.GetComponent<UIComponent>().OpenUIFormAsync("MyPackage", "MyPanel");Use attributes to configure animations:
[OptionUIShowAnimation(typeof(FadeInAnimation))]
[OptionUIHideAnimation(typeof(FadeOutAnimation))]
public class AnimatedPanel : FUI { }// Get the hierarchical path of a GObject
string path = gObject.GetUIPath();
// Resolve a GObject from path
GObject obj = FairyGUIPathFinderHelper.GetUIFromPath("GRoot/Group/MyButton");// Automatically unregisters events when the GObject is destroyed
myProperty.ClearWithGObjectDestroyed(gObject);| Platform | Supported |
|---|---|
| Android | โ |
| iOS | โ |
| Windows | โ |
| macOS | โ |
| WebGL | โ |
Minimum Unity version: 2019.4
- GameFrameX Documentation
- FairyGUI Documentation
- CHANGELOG
- LICENSE (MIT + Apache 2.0)
- QQ Group: 612311526
- GitHub Issues: Report a bug
- Author: Blank (alianblank@outlook.com)
See CHANGELOG.md for release history.
This project is dual-licensed under the MIT License and Apache License 2.0. See LICENSE.md for details.
