{"id":21358840,"url":"https://github.com/gameframex/com.gameframex.unity.ui.fairygui","last_synced_at":"2026-04-30T09:02:01.347Z","repository":{"id":256107957,"uuid":"848703801","full_name":"GameFrameX/com.gameframex.unity.ui.fairygui","owner":"GameFrameX","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-18T09:42:29.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T10:38:00.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GameFrameX.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-28T08:51:08.000Z","updated_at":"2025-06-18T09:42:33.000Z","dependencies_parsed_at":"2024-09-09T03:29:04.014Z","dependency_job_id":"df3c6793-0df2-4ec0-9f08-e36010c114de","html_url":"https://github.com/GameFrameX/com.gameframex.unity.ui.fairygui","commit_stats":null,"previous_names":["gameframex/com.gameframex.unity.ui.fairygui"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/GameFrameX/com.gameframex.unity.ui.fairygui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.ui.fairygui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.ui.fairygui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.ui.fairygui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.ui.fairygui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GameFrameX","download_url":"https://codeload.github.com/GameFrameX/com.gameframex.unity.ui.fairygui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.ui.fairygui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266785462,"owners_count":23983822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T05:22:35.722Z","updated_at":"2026-04-30T09:02:01.336Z","avatar_url":"https://github.com/GameFrameX.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![GameFrameX Logo](https://download.alianblank.com/gameframex/gameframex_logo_320.png)\n\n# GameFrameX UI FairyGUI\n\n[![Version](https://img.shields.io/github/v/release/GameFrameX/com.gameframex.unity.ui.fairygui?label=version\u0026color=green)](https://github.com/gameframex/com.gameframex.unity.ui.fairygui/releases)\n[![License](https://img.shields.io/badge/license-MIT+Apache%202.0-orange.svg)](LICENSE.md)\n[![Documentation](https://img.shields.io/badge/docs-gameframex-brightgreen.svg)](https://gameframex.doc.alianblank.com)\n\n**All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams**\n\n[📖 Documentation](https://gameframex.doc.alianblank.com) • [🚀 Quick Start](#quick-start) • [💬 QQ Group: 612311526](https://jq.qq.com/?_wv=1027\u0026k=5HXWqCg)\n\n---\n\n🌐 **Language**: **English** | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)\n\n---\n\n\u003c/div\u003e\n\n## Project Overview\n\nGameFrameX UI FairyGUI is a Unity UI adapter that wraps the [FairyGUI](https://www.fairygui.com/) framework into the GameFrameX modular game framework. It provides complete UI lifecycle management (open/close/recycle/animate) with async asset loading via YooAsset.\n\n### Key Features\n\n- **Complete UI Lifecycle** — Open, close, recycle, and animate UI forms with a unified API\n- **Async Asset Loading** — YooAsset-backed async loading for FairyGUI packages and resources\n- **Object Pooling** — UI form instances are pooled for reuse, minimizing GC allocations\n- **Singleton Deduplication** — Automatically prevents duplicate form creation\n- **Loading Queue** — Coalesces concurrent open requests for the same form\n- **Attribute-Driven Configuration** — Control UI groups, show/hide animations via C# attributes\n- **MVVM Binding Support** — Automatic cleanup of bindable property events with `BindablePropertyExtension`\n- **Dual Asset Loading** — Supports both `Resources.Load` and YooAsset AssetBundle loading\n- **IL2CPP Safe** — Preserve attributes prevent code stripping on IL2CPP builds\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────┐\n│              Your UI Panels (FUI)            │\n├─────────────────────────────────────────────┤\n│                  UIManager                   │\n│    (Open / Close / Recycle / Loading Queue)  │\n├──────────┬──────────┬───────────────────────┤\n│ FormHelper│UIGroup   │ PackageComponent      │\n│ (Create/  │Helper    │ (AddPackage /         │\n│  Release) │(Depth)   │  RemovePackage)       │\n├──────────┴──────────┴───────────────────────┤\n│         FairyGUI Runtime + YooAsset          │\n└─────────────────────────────────────────────┘\n```\n\n| Component | Description |\n|-----------|-------------|\n| `UIManager` | Central UI manager handling open/close/recycle lifecycle |\n| `FUI` | Base class for all FairyGUI panels — inherit from this |\n| `FairyGUIPackageComponent` | MonoBehaviour managing FairyGUI package loading/unloading |\n| `FairyGUIFormHelper` | Handles form instantiation, creation, and release |\n| `FairyGUIUIGroupHelper` | Manages UI group depth and layering |\n| `FairyGUILoadAsyncResourceHelper` | Bridges FairyGUI resource requests to YooAsset |\n| `FairyGUIPathFinderHelper` | Path-based GObject lookup utility |\n\n## Quick Start\n\n### Installation\n\nChoose one of the following methods:\n\n**Method 1: manifest.json**\n\nAdd the following to your project's `Packages/manifest.json` under `dependencies`:\n\n```json\n{\n  \"com.gameframex.unity.ui.fairygui\": \"https://github.com/AlianBlank/com.gameframex.unity.ui.fairygui.git\"\n}\n```\n\n**Method 2: Unity Package Manager (Git URL)**\n\nOpen Unity Package Manager → Add package from git URL:\n\n```\nhttps://github.com/gameframex/com.gameframex.unity.ui.fairygui.git\n```\n\n**Method 3: Manual**\n\nDownload the repository and place it in your Unity project's `Packages/` directory. Unity will auto-detect it.\n\n### Dependencies\n\n| Package | Version | Description |\n|---------|---------|-------------|\n| `com.gameframex.unity` | ≥ 1.1.1 | Core framework runtime |\n| `com.gameframex.unity.ui` | ≥ 1.0.0 | Base UI abstraction layer |\n| `com.gameframex.unity.asset` | ≥ 1.0.6 | Asset loading system |\n| `com.gameframex.unity.event` | ≥ 1.0.0 | Event system |\n| FairyGUI Runtime | — | FairyGUI library |\n| YooAsset | — | Asset management |\n| UniTask | — | Async/await support |\n\n### Basic Usage\n\n1. **Add `FairyGUIPackageComponent`** to your scene (via `GameFrameX → FairyGUIPackage` menu)\n\n2. **Create a UI panel** by inheriting from `FUI`:\n\n```csharp\nusing GameFrameX.UI.FairyGUI.Runtime;\n\n[OptionUIGroup(\"Default\")]\npublic class MyPanel : FUI\n{\n    protected override void OnInit()\n    {\n        // Initialize UI elements\n    }\n\n    protected override void OnOpen(object userData)\n    {\n        // Handle open logic\n    }\n\n    protected override void OnClose()\n    {\n        // Handle close logic\n    }\n}\n```\n\n3. **Open the panel** through the framework's UI component:\n\n```csharp\n// Open a UI panel asynchronously\nawait GameEntry.GetComponent\u003cUIComponent\u003e().OpenUIFormAsync(\"MyPackage\", \"MyPanel\");\n```\n\n## Usage Examples\n\n### Show/Hide Animations\n\nUse attributes to configure animations:\n\n```csharp\n[OptionUIShowAnimation(typeof(FadeInAnimation))]\n[OptionUIHideAnimation(typeof(FadeOutAnimation))]\npublic class AnimatedPanel : FUI { }\n```\n\n### Path-Based Object Lookup\n\n```csharp\n// Get the hierarchical path of a GObject\nstring path = gObject.GetUIPath();\n\n// Resolve a GObject from path\nGObject obj = FairyGUIPathFinderHelper.GetUIFromPath(\"GRoot/Group/MyButton\");\n```\n\n### MVVM Binding with Auto-Cleanup\n\n```csharp\n// Automatically unregisters events when the GObject is destroyed\nmyProperty.ClearWithGObjectDestroyed(gObject);\n```\n\n## Platform Support\n\n| Platform | Supported |\n|----------|-----------|\n| Android | ✅ |\n| iOS | ✅ |\n| Windows | ✅ |\n| macOS | ✅ |\n| WebGL | ✅ |\n\nMinimum Unity version: **2019.4**\n\n## Documentation \u0026 Resources\n\n- [GameFrameX Documentation](https://gameframex.doc.alianblank.com)\n- [FairyGUI Documentation](https://www.fairygui.com/docs)\n- [CHANGELOG](CHANGELOG.md)\n- [LICENSE](LICENSE.md) (MIT + Apache 2.0)\n\n## Community \u0026 Support\n\n- **QQ Group**: [612311526](https://jq.qq.com/?_wv=1027\u0026k=5HXWqCg)\n- **GitHub Issues**: [Report a bug](https://github.com/gameframex/com.gameframex.unity.ui.fairygui/issues)\n- **Author**: Blank ([alianblank@outlook.com](mailto:alianblank@outlook.com))\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for release history.\n\n## License\n\nThis project is dual-licensed under the [MIT License](https://opensource.org/licenses/MIT) and [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). See [LICENSE.md](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.ui.fairygui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.ui.fairygui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.ui.fairygui/lists"}