{"id":51040183,"url":"https://github.com/gameframex/com.gameframex.unity.startup","last_synced_at":"2026-06-22T10:01:50.700Z","repository":{"id":365153017,"uuid":"1270234046","full_name":"GameFrameX/com.gameframex.unity.startup","owner":"GameFrameX","description":"Generic Unity game startup flow scaffold. Encapsulates app launch to hotfix loading pipeline with primary-backup URL failover, YooAsset patching, and pluggable UI/hotfix backends via IStartupUIHandler/IHotfixLauncher interfaces. Built on GameFrameX Procedure/FSM/Event system with UniTask async support.","archived":false,"fork":false,"pushed_at":"2026-06-16T04:25:12.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T07:15:15.012Z","etag":null,"topics":["async","csharp","failover","fsm","game-development","game-framework","gameframex","hot-update","hotfix","hybridclr","procedure","scriptableobject","startup","unitask","unity","unity-package","unity3d","upm","upm-package","yooasset"],"latest_commit_sha":null,"homepage":"https://gameframex.doc.alianblank.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GameFrameX.png","metadata":{"files":{"readme":"README.ja.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-15T14:11:03.000Z","updated_at":"2026-06-16T04:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/GameFrameX/com.gameframex.unity.startup","commit_stats":null,"previous_names":["gameframex/com.gameframex.unity.startup"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GameFrameX/com.gameframex.unity.startup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.startup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.startup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.startup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.startup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GameFrameX","download_url":"https://codeload.github.com/GameFrameX/com.gameframex.unity.startup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GameFrameX%2Fcom.gameframex.unity.startup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34643624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["async","csharp","failover","fsm","game-development","game-framework","gameframex","hot-update","hotfix","hybridclr","procedure","scriptableobject","startup","unitask","unity","unity-package","unity3d","upm","upm-package","yooasset"],"created_at":"2026-06-22T10:01:49.135Z","updated_at":"2026-06-22T10:01:50.692Z","avatar_url":"https://github.com/GameFrameX.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GameFrameX Startup\n\n\u003e Unity 汎用ゲーム起動フロー足場。URL プライマリ・バックアップ failover、YooAsset パッチフロー、プラグイン可能な UI/ホットフィックスバックエンドを備えた、アプリ起動からホットフィックス読み込みまでの完全なパイプラインをカプセル化します。\n\n[**日本語**](README.ja.md) | [English](README.md) | [简体中文](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [한국어](README.ko.md)\n\n## 機能特性\n\n- **一行エントリ**：`await StartupRunner.Run(options, uiHandler, hotfixLauncher)`\n- **設定駆動**：`StartupOptions` ScriptableObject、10 フィールド（URL リスト、熱更エントリ、HTTP パラメータ、UI リソース）\n- **主備 failover**：`GlobalInfoUrls[]` 配列 + `MaxAttemptsPerUrl` リトライポリシー\n- **UI バックエンド非依存**：`IStartupUIHandler` インターフェース、FairyGUI / UGUI / カスタム UI に対応\n- **ホットフィックス方案非依存**：`IHotfixLauncher` インターフェース、HybridCLR / 他のホットフィックス方案に対応\n- **二軌完了通知**：`UniTask\u003cStartupResult\u003e` await + `StartupCompleted/FailedEventArgs` イベント（両方の経路がトリガー）\n- **PlayMode 適応**：`EditorSimulateMode` / `OfflinePlayMode` / `HostPlayMode` / `WebPlayMode` 分岐処理\n- **YooAsset 統合**：標準パッチフロー（初期化 → 静的バージョン → マニフェスト → ダウンロード → 完了）\n- **チャネル SDK を呼ばない**：Channel/SubChannel フィールドは純データ、SDK 依存なし\n\n## インストール\n\n`Packages/manifest.json` に追加：\n\n```json\n{\n  \"dependencies\": {\n    \"com.gameframex.unity.startup\": \"1.1.0\"\n  },\n  \"scopedRegistries\": [\n    {\n      \"name\": \"GameFrameX\",\n      \"url\": \"https://gameframex.upm.alianblank.uk\",\n      \"scopes\": [\"com.gameframex\"]\n    }\n  ]\n}\n```\n\n`scopes` は、どのパッケージをこのレジストリから解決するかを制御します。`com.gameframex` で始まるパッケージのみがこのレジストリから取得されます。\n\n## クイックスタート\n\n### 1. 設定アセットの作成\n\nUnity Editor で：`Create \u003e GameFrameX \u003e Startup Options`。設定：\n\n- `GlobalInfoUrls`：グローバル情報 API の主備 URL リスト\n- `HotfixAssemblyName` / `HotfixEntryTypeName` / `HotfixEntryMethodName`：ホットフィックスエントリポイント\n- `PackageName` / `Channel` / `SubChannel`：HTTP 公共パラメータ\n- `LauncherUIResName`：起動 UI リソースパス（デフォルト `UI/UILauncher`）\n\n### 2. UI ハンドラの実装\n\n```csharp\npublic class GameStartupUIHandler : IStartupUIHandler\n{\n    public UniTask StartAsync(string uiResName) { /* UI の読込 */ }\n    public void SetTipText(string text) { /* ヒントテキストの更新 */ }\n    public void SetProgress(float progress, string sizeInfo) { /* プログレスバーの更新 */ }\n    public void SetProgressUpdateFinish() { /* 完了マーク */ }\n    public void Dispose() { /* UI を閉じる、サブスクリプションを解放 */ }\n}\n```\n\n### 3. ホットフィックスランチャーの実装\n\n```csharp\npublic class HybridClrHotfixLauncher : IHotfixLauncher\n{\n    public async UniTask\u003cHotfixLaunchResult\u003e StartAsync(StartupOptions options)\n    {\n        // options.HotfixAssemblyName でホットフィックスアセンブリを読込\n        // options.HotfixEntryTypeName.options.HotfixEntryMethodName を呼び出す\n        return HotfixLaunchResult.Succeed();\n    }\n}\n```\n\n### 4. 起動\n\n```csharp\npublic class GameBootstrap : MonoBehaviour\n{\n    [SerializeField] private StartupOptions _options;\n\n    private async void Start()\n    {\n        var uiHandler = new GameStartupUIHandler();\n        var hotfixLauncher = new HybridClrHotfixLauncher();\n\n        var result = await StartupRunner.Run(_options, uiHandler, hotfixLauncher);\n\n        if (result.Success)\n        {\n            // 起動完了、ゲーム準備完了\n        }\n        else\n        {\n            Debug.LogError($\"起動失敗 at {result.FailedProcedureName}: {result.ErrorMessage}\");\n        }\n    }\n}\n```\n\nイベントサブスクリプションで通知を分離することもできます：\n\n```csharp\nGameApp.Event.Subscribe(StartupCompletedEventArgs.EventId, OnStartupCompleted);\nGameApp.Event.Subscribe(StartupFailedEventArgs.EventId, OnStartupFailed);\n```\n\n## API リファレンス\n\n### コア型\n\n| 型 | 説明 |\n|-----|------|\n| `StartupOptions` | ScriptableObject 設定アセット（10 フィールド） |\n| `StartupResult` | 戻り値、`Success` / `FailedProcedureName` / `FailedUrl` / `ErrorMessage` を含む |\n| `HotfixLaunchResult` | ホットフィックス専用結果、`Success` / `ErrorMessage` を含む |\n| `IStartupUIHandler` | UI 操作インターフェース（5 メソッド） |\n| `IHotfixLauncher` | ホットフィックス起動インターフェース（1 つの非同期メソッド） |\n| `StartupCompletedEventArgs` | 成功通知イベント |\n| `StartupFailedEventArgs` | 失敗通知イベント、診断フィールドを含む |\n| `StartupRunner` | 静的エントリ — `Run(options, uiHandler, hotfixLauncher)` |\n| `UrlFailoverRunner` | URL 主備順序試行ヘルパー、境界付きリトライ対応 |\n| `UrlAttemptResult` / `UrlFailoverResult` | URL 単一試行結果と最終 failover 結果の値型 |\n| `StartupHttpParams` | HTTP 公共パラメータコンテナ、JSON シリアライズ対応 |\n\n### FSM BlackBoard key\n\nパッケージは procedure FSM に 3 つの固定 key を注入してクロス状態データ共有を実現：\n\n| Key | 型 | 内容 |\n|-----|------|------|\n| `__startup_options__` | `VarObject` | `StartupOptions` インスタンス |\n| `__startup_ui_handler__` | `VarObject` | `IStartupUIHandler` インスタンス |\n| `__startup_hotfix_launcher__` | `VarObject` | `IHotfixLauncher` インスタンス |\n\n定数は `GameFrameX.Startup.Runtime.Constants.BlackBoardKeys` に配置。\n\n## 依存\n\n- `com.gameframex.unity`（GameApp ファサード、Utility、ReferencePool）\n- `com.gameframex.unity.procedure`（ProcedureBase、IProcedureManager）\n- `com.gameframex.unity.fsm`（IFsm\u003cT\u003e、IFsmManager）\n- `com.gameframex.unity.event`（GameEventArgs、EventComponent.Fire）\n- `com.gameframex.unity.cysharp.unitask`（UniTask、UniTaskCompletionSource）\n- Unity 2019.4+\n\n## ドキュメント\n\n- [フル spec](https://gameframex.doc.alianblank.com)\n- [変更記録](CHANGELOG.md)\n- [ライセンス](LICENSE.md)\n\n## ライセンス\n\n詳細は [LICENSE.md](LICENSE.md) をご覧ください。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.startup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.startup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgameframex%2Fcom.gameframex.unity.startup/lists"}