{"id":16209403,"url":"https://github.com/michael811125/oxgkit","last_synced_at":"2025-08-02T01:36:17.609Z","repository":{"id":167690157,"uuid":"640303569","full_name":"michael811125/OxGKit","owner":"michael811125","description":"The OxGKit is a system tool kit commonly used in game development based on Unity design (all are independent tools).","archived":false,"fork":false,"pushed_at":"2025-03-10T14:14:29.000Z","size":3071,"stargazers_count":45,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T14:39:53.415Z","etag":null,"topics":["infinite-scroll","infinitescrollview","inputsystem","logging","oxgkit","reddot","unity","unity-actions","unity-logger","unity-tool","unity-toolkit","unity-tools","unity-tween","unity-utilities","unity-utils","unity3d-plugin","utilities","utility"],"latest_commit_sha":null,"homepage":"","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/michael811125.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-05-13T16:33:39.000Z","updated_at":"2025-03-10T14:14:32.000Z","dependencies_parsed_at":"2024-02-02T06:28:05.141Z","dependency_job_id":"d065fd7e-3995-43bd-9e94-ae334042557f","html_url":"https://github.com/michael811125/OxGKit","commit_stats":null,"previous_names":["michael811125/oxgkit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael811125%2FOxGKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael811125%2FOxGKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael811125%2FOxGKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael811125%2FOxGKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael811125","download_url":"https://codeload.github.com/michael811125/OxGKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814864,"owners_count":20352037,"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","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":["infinite-scroll","infinitescrollview","inputsystem","logging","oxgkit","reddot","unity","unity-actions","unity-logger","unity-tool","unity-toolkit","unity-tools","unity-tween","unity-utilities","unity-utils","unity3d-plugin","utilities","utility"],"created_at":"2024-10-10T10:29:29.733Z","updated_at":"2025-08-02T01:36:17.595Z","avatar_url":"https://github.com/michael811125.png","language":"C#","funding_links":["https://paypal.me/MichaelOthx?country.x=TW\u0026locale.x=zh_TW","https://www.buymeacoffee.com/michael8116"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n  \u003cimg width=\"384\" height=\"384\" src=\"Docs/OxGKit_Logo_v1.png\"\u003e\r\n\u003c/p\u003e\r\n\r\n[![License](https://img.shields.io/github/license/michael811125/OxGKit)](https://github.com/michael811125/OxGKit/blob/master/LICENSE.md)\r\n\r\n---\r\n\r\n## 基本介紹\r\n\r\nOxGKit 是基於 Unity 設計於遊戲開發常用的系統工具組 (皆為獨立工具)。\r\n\r\n**TODO 未來會補充 OxGKit 的文檔**\r\n\r\n[Coding Style wiki](https://github.com/michael811125/OxGFrame/wiki/Coding-Style)\r\n\r\n**目前包含以下**\r\n\r\n- [無限列表 (Infinite ScrollView)](https://github.com/michael811125/OxGKit#infinitescrollview-dependence-unitask-oxgkitloggingsystem)\r\n- [動作序列系統 (Action System)](https://github.com/michael811125/OxGKit#actionsystem-dependence-unitask-oxgkitloggingsystem)\r\n- [通知系統 (Notice System)](https://github.com/michael811125/OxGKit#noticesystem-or-reddotsystem-dependence-oxgkitloggingsystem)\r\n- [輸入控制系統 (Input System)](https://github.com/michael811125/OxGKit#inputsystem-dependence-unity-new-inputsystem-oxgkitloggingsystem)\r\n- [日誌系統 (Logging System)](https://github.com/michael811125/OxGKit#loggingsystem-dependence-lwmybox)\r\n- [DoTween Pro 的補間動畫系統 (TweenSystem)](https://github.com/michael811125/OxGKit#tweensystem-dependence-dotween-pro-lwmybox-oxgkitutilities)\r\n- [按鈕系統 (Button System)](https://github.com/michael811125/OxGKit#buttonsystem)\r\n- [時間系統 (Time System)](https://github.com/michael811125/OxGKit#timesystem)\r\n- [游標系統 (Cursor System)](https://github.com/michael811125/OxGKit#cursorsystem)\r\n- [物件池系統 (Pool System)](https://github.com/michael811125/OxGKit#poolsystem)\r\n- [單例系統 (Singleton System)](https://github.com/michael811125/OxGKit#singletonsystem)\r\n- [儲存系統 (Saver System)](https://github.com/michael811125/OxGKit#saversystem)\r\n- [本地化系統 (Localization System)](https://github.com/michael811125/OxGKit#localizationsystem)\r\n- [各通用必備組件工具 (Utilities)](https://github.com/michael811125/OxGKit#utilities-dependence-unitask)\r\n\r\n*[會持續擴充工具系統組]*\r\n\r\n![](Docs/img_1.png)\r\n\r\n---\r\n\r\n## 工具系統介紹\r\n\r\n## InfiniteScrollView (dependence UniTask, OxGKit.LoggingSystem)\r\n\r\n無限列表 (魔改版)，基於原生 UGUI 能夠簡單的繼承或使用現有的 Infinite ScrollView，以物件池的概念進行物件有效循環利用。\r\n\r\nReference: [howtungtung - InfiniteScrollView](https://github.com/howtungtung/InfiniteScrollView)\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/InfiniteScrollView/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 [UnitTask v2.5.0 or higher](https://github.com/Cysharp/UniTask)\r\n- 使用 OxGKit.LoggingSystem, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager\r\n\r\n※備註 : Right-Click Create/OxGKit/Infinite ScrollView... (Template cs)\r\n\r\n---\r\n\r\n## ActionSystem (dependence UniTask, OxGKit.LoggingSystem)\r\n\r\n動作序列系統，能夠自行定義 Action 並且自行組合運行組，預設 Actions 有 SequenceAction, ParallelAction, ParallelDelayAction, DelayAction, DelegateAction，另外如果針對動畫需要進行拼湊處理，也可以使用 ActionSystem 作為運行。\r\n- 透過 Right-Click Create/OxGKit/Action System/Template Action.cs 實作自定義 Action。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/ActionSystem/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 [UnitTask v2.5.0 or higher](https://github.com/Cysharp/UniTask)\r\n- 使用 OxGKit.LoggingSystem, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager\r\n\r\n**ActionSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/169d91ea-3709-420c-8751-f50119e97d35\r\n\r\n※備註 : Right-Click Create/OxGKit/Action System... (Template cs)\r\n\r\n---\r\n\r\n## NoticeSystem or RedDotSystem (dependence OxGKit.LoggingSystem)\r\n\r\n通知系統 (也稱紅點系統)，支援動態新增刪除通知條件，可以自行定義通知條件，再針對 NoticeItem 進行條件持有註冊，當 NoticeItem 身上其中持有任一符合條件則通知顯示圖示 (紅點)。\r\n- 透過 Right-Click Create/OxGKit/Notice System/Template Notice Condition.cs 實作通知條件。\r\n- 將 NoticeItem prefab 拖曳至 UI 上，自行指定 ICON，再取得 NoticeItem 身上的組件進行條件註冊 (當 OnDestroy 時，會自動 Deregister)。\r\n- 當有數據狀態變更時，必須通知特定條件 ID 進行 Notify，將會透過條件 ID 進行查找持有的 NoticeItems，並且進行刷新顯示。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/NoticeSystem/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 OxGKit.LoggingSystem, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager\r\n\r\n**NoticeSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/c6966327-3ede-432e-b8fe-bee53f629f25\r\n\r\n※備註 : Right-Click Create/OxGKit/Notice System... (Template cs)\r\n\r\n---\r\n\r\n## InputSystem (dependence Unity New InputSystem, OxGKit.LoggingSystem)\r\n\r\n輸入控制系統，支援 Unity New InputSystem，如果使用 Unity New InputSystem 需自行建立 Unity New InpuptSystem 的控制表 (Control Maps)，並且還有提供使用於 Unity New InputSystem 的 Binding Composite 腳本模板，最後再由 Input Action 派送輸入訊號控制由訂閱者訂閱，進而做到遊戲中的控制邏輯不需要知道平台裝置區分，皆由 Input Action 進行整合，當然 Input Action 也支援其他輸入控制插件，作為單純的輸入控制派送者。\r\n- 透過 Right-Click Create/OxGKit/Input System/Template Input Action.cs 實作 InputAction 介面。\r\n- 調用 Inputs API (using.OxGkit.InputSystem)\r\n\r\n**主要層級驅動區分為以下**\r\n\r\n- For Unity New InputSystem\r\n  - Control Maps (Input Action Asset)\r\n  - Binding Composites\r\n- For Any Inputs\r\n  - Input Actions (此為獨立作為通用訊號派送者，不依賴任何輸入控制插件，皆可自由實現)\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/InputSystem/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 [Unity New InputSystem v1.5.1 or higher](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.5/manual/Installation.html)\r\n- 使用 OxGKit.LoggingSystem, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager\r\n\r\n**InputSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/20548ee4-b77b-4cda-8d49-c82b16deddb7\r\n\r\n※備註 : Right-Click Create/OxGKit/Input System... (Template cs)\r\n\r\n---\r\n\r\n## LoggingSystem (dependence LWMyBox)\r\n\r\n日誌系統，支持 Cipher \u0026 Plaintext (可以任一轉換)，支持動態配置與覆寫原有的日誌器功能，其他還有全域開關、全域級別、個別開關配置、個別級別配置。\r\n- 透過 Right-Click Create/OxGKit/Logging System/Create loggersconfig.conf (In StreamingAssets) 建立配置檔。\r\n  - ![](Docs/img_7.png)\r\n- 透過 LoggingLauncher 進行配置或只直接修改 loggersconfig.conf 文件。\r\n\r\n**Build 激活宏**\r\n- OXGKIT_LOGGER_ON\r\n\r\n配置文件轉換。\r\n\r\n![](Docs/img_6.png)\r\n\r\nLoggingLauncher 配置介面，可以配置 logActive (開關)、logLevel (級別)。\r\n- 透過 Package Manager -\u003e Samples 匯入 LoggingLauncher Prefab，再拖曳至場景上激活環境配置 (僅需激活一次)，會自動嘗試加載 loggersconfig.conf 進行日誌開關控制。 \r\n\r\n![](Docs/img_4.png)\r\n\r\n新增 Logger 或移除 Logger，皆需呼叫 LoggingLauncher.TryLoadLoggers() 進行重載 (建議定義一個 default constructor，避免搭配 HybridCLR + Activator.CreateInstance(type) 出現錯誤)。\r\n```C#\r\nusing OxGKit.LoggingSystem;\r\n\r\n[LoggerName(\"MyLogger\")]\r\npublic class MyLogger1 : Logging \r\n{\r\n    // If use HybridCLR must create a default constructor\r\n    public MyLogger1() { }\r\n}\r\n\r\n// Use same name to override MyLogger1\r\n[LoggerName(\"MyLogger\", true)]\r\npublic class MyLogger2 : Logging \r\n{\r\n    // If use HybridCLR must create a default constructor\r\n    public MyLogger2() { }\r\n\t\r\n    public override void Log(object message)\r\n    {\r\n        UnityEngine.Debug.Log(\"[Override]\" + message);\r\n    }\r\n    \r\n    public override void LogWarning(object message)\r\n    {\r\n        UnityEngine.Debug.LogWarning(\"[Override]\" + message);\r\n    }\r\n    \r\n    public override void LogError(object message)\r\n    {\r\n        UnityEngine.Debug.LogError(\"[Override]\" + message);\r\n    }\r\n    \r\n    public override void LogException(Exception exception)\r\n    {\r\n        UnityEngine.Debug.LogException(exception);\r\n    }\r\n}\r\n```\r\n\r\n如果搭配 HybridCLR 有主工程跟熱更工程的區分，必須手動拆分創建 AOT 跟 Hotfix 的 Loggers 初始流程，可以參考以下：\r\n```C#\r\n// HybridCLR (必須取消 LoggingLauncher 上的 \"Initialize On Awake\" 選項):\r\nLoggingLauncher.CreateLogger\u003cLoggingDemoLogger1\u003e();\r\nLoggingLauncher.CreateLogger\u003cLoggingDemoLogger2\u003e();\r\nLoggingLauncher.CreateLogger\u003cLoggingDemoLogger3\u003e();\r\nLoggingLauncher.CreateLogger\u003cLoggingDemoLogger4\u003e();\r\nLoggingLauncher.TryLoadLoggers();\r\n```\r\n\r\n動態配置日誌器，參考如下：\r\n```C#\r\n// Reload LoggersConfig at Runtime (方式一)\r\nvar loggersConfig = new LoggersConfig\r\n(\r\n    new LoggerSetting(\"LoggingDemo.Logger1\", true, LogLevel.Log),\r\n    new LoggerSetting(\"LoggingDemo.Logger2\", true, LogLevel.LogWarning),\r\n    new LoggerSetting(\"LoggingDemo.Logger3\", true, LogLevel.Off)\r\n);\r\nLoggingLauncher.SetLoggersConfig(loggersConfig);\r\n\r\n// Reload LoggersConfig at Runtime (方式二)\r\nLoggingLauncher.ConfigureLogger(\"LoggingDemo.Logger1\", false);\r\nLoggingLauncher.ConfigureLogger(\"LoggingDemo.Logger2\", true, LogLevel.LogWarning | LogLevel.LogError);\r\nLoggingLauncher.ConfigureLogger(\"LoggingDemo.Logger3\", false);\r\n```\r\n\r\n以下是在 AOT 工程中初始 AOT 工程的 Loggers **(如果 Hotfix 工程的 Loggers 需要再 Hotfix 工程中初始)**：\r\n\r\n![](Docs/img_5.png)\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 [LWMyBox v1.1.4 or higher](https://github.com/michael811125/LWMyBox), Add https://github.com/michael811125/LWMyBox.git to Package Manager\r\n\r\n**LoggingSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/51ecddd7-5241-43e9-9104-de45cbc5f68d\r\n\r\n**LoggingSystem Build Test**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/cef1a484-d617-466d-bf3e-6104032d7c3f\r\n\r\n---\r\n\r\n## TweenSystem (dependence DoTween Pro, LWMyBox, OxGKit.Utilities)\r\n\r\n補間動畫 (僅支持 [DoTween Pro](https://assetstore.unity.com/packages/tools/visual-scripting/dotween-pro-32416))。\r\n- Add Component/OxGKit/TweenSystem/DoTweenAnim\r\n- Add Component/OxGKit/TweenSystem/DoTweenAnimEvent\r\n\r\n**Highly Recommended [brunomikoski - Animation Sequencer](https://github.com/brunomikoski/Animation-Sequencer)**\r\n\r\n\u003c!---\r\n**注意：建議先安裝 OxGKit.TweenSystemFixer，避免編譯失敗導致 MenuItem 無法顯示與啟用**\r\n\r\n- Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TweenSystemFixer/Scripts to Package Manager\r\n---\u003e\r\n\r\nPreview Mode (Only DoTweenAnim component is supported)\r\n\r\n![](Docs/img_3.png)\r\n\r\n※Note: The DoTweenAnimEvent only plays at runtime.\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TweenSystem/Scripts to Package Manager |\r\n\r\n**第三方庫 (需自行購買安裝)**\r\n- 使用 [DoTween Pro v1.0.335 or higher](https://assetstore.unity.com/packages/tools/visual-scripting/dotween-pro-32416)\r\n\r\n**第三方庫 (需自行安裝)**\r\n- 使用 [LWMyBox v1.1.4 or higher](https://github.com/michael811125/LWMyBox), Add https://github.com/michael811125/LWMyBox.git to Package Manager\r\n- 使用 OxGKit.Utilities, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts to Package Manager\r\n\r\n\u003c!--- ### Create DoTween Assemblies (Must use TweenSystemFixer to fix GUID) ---\u003e\r\n### Create DoTween Assemblies\r\n\r\n![](Docs/gif_1.gif)\r\n\r\n**TweenSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/6bf690b6-c4d0-40f6-b3c9-b50ab62562e8\r\n\r\n\u003c!---\r\n---\r\n\r\n### TweenSystemFixer (only for OxGkit.TweenSystem)\r\n\r\n用於修復 OxGKit.TweenSystem 查找 DOTween.Modules assembly GUID 失敗問題，主要是因為 DoTween Pro 插件每次生成的 Assembly GUID 都不一樣，所以需要固定設置 OxGKit.TweenSystem 原本引用的 GUID，才能正確引用到 DOTween.Modules 的庫。\r\n\r\n**僅用於修復 OxGKit.TweenSystem 已引用 DoTween.Modules 的固定 GUID**\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TweenSystemFixer/Scripts to Package Manager |\r\n\r\n### Reassign DOTween.Modules assembly GUID (Fix Error GUID)\r\n\r\n#### 手動修復 Fixed GUID\r\n\r\n如果未事先額外安裝 OxGKit.TweenSystemFixer 者，可以直接使用 Notepad++ 開啟 Plugins/Demigiant/DoTween/Modules/DOTween.Modules.asmdef.meta，直接修改 GUID 為以下 Fixed GUID 即可。\r\n- 如果已經有其他 Assembly 引用原有 DoTween.Modules GUID，也要將原有 DoTween.Modules 的 GUID 取代成以下 Fixed GUID。\r\n\r\n**Fixed GUID**\r\n\r\n```\r\nfdf3e181e62e9d243a7fee5ce890ab71\r\n```\r\n\r\n#### 工具修復 Fixed GUID\r\n\r\n![](Docs/img_2.png)\r\n\r\n![](Docs/gif_2.gif)\r\n---\u003e\r\n---\r\n\r\n## ButtonSystem\r\n\r\nButtonPlus 是基於繼承 Unity UGUI 的 Button 進行擴展的，功能擴展支持各 Long Click 等行為。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/ButtonSystem/Scripts to Package Manager |\r\n\r\n**ButtonSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/891291af-1bb4-4515-bec6-a9877f4ca254\r\n\r\n## TimeSystem\r\n\r\n各種 DeltaTimer, RealTimer, DTUpdater, RTUpdater, IntervalTimer, IntervalSetter, NtpTime (clock sync with NTP server) 關於時間的控制器。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TimeSystem/Scripts to Package Manager |\r\n\r\n**TimeSystem Demo**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/ee085eb4-f803-45e5-9593-b481a4b5a821\r\n\r\n## CursorSystem\r\n\r\nCursor 游標管理器，支持靜態與動態游標與各種狀態行為切換 (例如經營模擬類的遊戲，需要有各種游標狀態等...)。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/CursorSystem/Scripts to Package Manager |\r\n\r\n**CursorSystem Demo**\r\n\r\nhttps://github.com/user-attachments/assets/49e2a081-6d31-4ba6-8bb8-be60a148742c\r\n\r\n## PoolSystem\r\n\r\n簡易 GameObject 物件池，支持異步分散幀加載 (負載平衡)。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/PoolSystem/Scripts to Package Manager |\r\n\r\n**PoolSystem Demo**\r\n\r\nhttps://github.com/user-attachments/assets/822d2431-0ee4-487c-9331-b62257ba95fd\r\n\r\n## SingletonSystem\r\n\r\n單例模式，支持 MonoSingleton (MonoBehaviour), NewSingleton (class)。\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/SingletonSystem/Scripts to Package Manager |\r\n\r\n## SaverSystem\r\n\r\n簡易儲存系統，支持以文本形式儲存，預設提供 EditorPrefsSaver, PlayerPrefsSaver，可自行擴展。\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/SaverSystem/Scripts to Package Manager |\r\n\r\n## LocalizationSystem\r\n\r\n本地化系統，支持自定義解表方式與自定義支持語系。\r\n\r\n必須實現以下回調進行初始配置：\r\n - Localization.onAddSupportedLanguages\r\n - Localization.onParsingLanguageData\r\n - Localization.onChangeLanguage\r\n \r\n```C#\r\n#region Localization Config\r\n/// \u003csummary\u003e\r\n/// Initialize localization config\r\n/// \u003c/summary\u003e\r\npublic static void InitializeLocalization()\r\n{\r\n    // Add supproted languages\r\n    Localization.onAddSupportedLanguages = AddSupportedLanguages;\r\n\r\n    // Parsing language table data\r\n    Localization.onParsingLanguageData = ParsingLanguageData;\r\n}\r\n\r\n/// \u003csummary\u003e\r\n/// Handle by Localization.onAddSupportedLanguages\r\n/// \u003c/summary\u003e\r\n/// \u003cparam name=\"supportedLanguages\"\u003e\u003c/param\u003e\r\npublic static void AddSupportedLanguages(HashSet\u003cLangType\u003e supportedLanguages)\r\n{\r\n    supportedLanguages.Add(LangType.English);\r\n    supportedLanguages.Add(LangType.ChineseTraditional);\r\n    supportedLanguages.Add(LangType.ChineseSimplified);\r\n    supportedLanguages.Add(LangType.Japanese);\r\n    supportedLanguages.Add(LangType.Korean);\r\n}\r\n\r\n/// \u003csummary\u003e\r\n/// Handle by Localization.onParsingLanguageData\r\n/// \u003c/summary\u003e\r\n/// \u003cparam name=\"langType\"\u003e\u003c/param\u003e\r\n/// \u003cparam name=\"langData\"\u003e\u003c/param\u003e\r\n/// \u003creturns\u003e\u003c/returns\u003e\r\npublic static bool ParsingLanguageData(LangType langType, Dictionary\u003cstring, string\u003e langData)\r\n{\r\n    // Your lang sheet (can load from json or server)\r\n    if (langSheet.ContainsKey(langType.ToString()))\r\n    {\r\n        // The ref langData will be cached by Localization \r\n        foreach (var pair in langSheet[langType.ToString()])\r\n            langData.TryAdd(pair.Key, pair.Value);\r\n        return true;\r\n    }\r\n    return false;\r\n}\r\n#endregion\r\n\r\n#region UI View Logic\r\n/// \u003csummary\u003e\r\n/// Init events\r\n/// \u003c/summary\u003e\r\nprivate void _InitEvents()\r\n{\r\n    // Refresh lang text callback\r\n    Localization.onChangeLanguage += this._RefreshLanguage;\r\n}\r\n\r\n/// \u003csummary\u003e\r\n/// Handle by Localization.onChangeLanguage\r\n/// \u003c/summary\u003e\r\nprivate void _RefreshLanguage(LangType langType)\r\n{\r\n    if (this.texts != null)\r\n    {\r\n        this.texts[0].text = Localization.GetStringByCode(\"Str1\");\r\n        this.texts[1].text = Localization.GetStringByCode(\"Str2\");\r\n        this.texts[2].text = Localization.GetStringByCode(\"Str3\");\r\n    }\r\n}\r\n#endregion\r\n```\r\n\r\n**Localization Demo**\r\n\r\n![](Docs/gif_3.gif)\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LocalizationSystem/Scripts to Package Manager |\r\n\r\n## Utilities (dependence UniTask)\r\n\r\n各通用組件 (Essential)。\r\n\r\n- Utilities \r\n  - Adapter: UISafeAreaAdapter.\r\n  - Cacher: ARCCache\u003cTKey, TValue\u003e, LRUCache\u003cTKey, TValue\u003e, LRUKCache\u003cTKey, TValue\u003e.\r\n  - Requester: RequestAudio, RequestTexture2D, RequestSprite, RequestBytes, RequestText.\r\n  - TextureAnim (CPU computation): Image sequence animation.\r\n  - EasyAnim: Must set an animation event on the clip with the function name AnimEnd to invoke the animEnd callback.\r\n  - DontDestroy.\r\n  - UnityMainThread: UMT.\r\n- Editor\r\n  - RectTransform: RectTransformAdjuster (Hotkey: Shift+R, R: RectTransform).\r\n  - MissingScriptsFinder.\r\n  - SymlinkUtility.\r\n\r\n*[參考 Example]*\r\n\r\n### Installation\r\n\r\n| Install via git URL |\r\n|:-|\r\n| Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts to Package Manager |\r\n\r\n**第三方庫 (獨立安裝時，需自行安裝; 如果搭配 [OxGFrame](https://github.com/michael811125/OxGFrame) 則不需要額外安裝 UniTask)**\r\n- 使用 [UnitTask v2.5.0 or higher](https://github.com/Cysharp/UniTask)\r\n- 使用 [LWMyBox v1.1.4 or higher](https://github.com/michael811125/LWMyBox), Add https://github.com/michael811125/LWMyBox.git to Package Manager\r\n- 使用 OxGKit.LoggingSystem, Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager\r\n\r\n**Utilities Demo (RectTransformAdjuster)**\r\n\r\nhttps://github.com/michael811125/OxGKit/assets/30960759/cd43fc8b-c6f7-4878-990b-99dcacb8ed1f\r\n\r\n---\r\n\r\n### Unity 版本\r\n\r\n建議使用 Unity 2022.3.59f1(LTS) or higher 版本 - [Unity Download](https://unity3d.com/get-unity/download/archive)\r\n\r\n---\r\n\r\n### Donate\r\n\r\n[![paypal_logo_x128](https://github.com/michael811125/OxGFrame/assets/30960759/abe46416-b347-4cce-b41a-8004cbe52a5d)](https://paypal.me/MichaelOthx?country.x=TW\u0026locale.x=zh_TW)\r\n\r\n[![buymeacoffee_qrcode_x128](https://github.com/michael811125/OxGFrame/assets/30960759/179d19ad-b0e9-4a41-b045-99171f0bd7bb)](https://www.buymeacoffee.com/michael8116)\r\n\r\n---\r\n\r\n## License\r\n\r\nThis library is under the MIT License.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael811125%2Foxgkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael811125%2Foxgkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael811125%2Foxgkit/lists"}