跳到主要内容

快速上手

重要 注意 提醒

Coding Style wiki


开始安装 OxGKit

注意 OxGKit 皆为独立工具系统,没有一次安装全部的必要,需要什么装什么,依照各模块需求安装对应的依赖即可。

步骤 1. (安装依赖)

依照你要安装的模块,先安装其依赖的第三方库 (各模块依赖请参考步骤 2 的依赖标注)。

  • 1 UniTask (InfiniteScrollView、ActionSystem、TimeSystem、PoolSystem、Utilities 依赖)

通过 Package Manager 安装 (Install via git)

https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask
  • 2 LWMyBox (LoggingSystem、TweenSystem、PoolSystem、Utilities 依赖)

通过 Package Manager 安装 (Install via git)

https://github.com/michael811125/LWMyBox.git

通过 Package Manager 安装 (Install by name)

com.unity.inputsystem
  • 4 DoTween Pro (TweenSystem 依赖,需自行购买安装)

  • 提醒 OxGKit.LoggingSystem 为多数模块的共同依赖 (InfiniteScrollView、ActionSystem、NoticeSystem、InputSystem、TimeSystem、PoolSystem、Utilities),建议最先安装

https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts

步骤 2. (安装模块)

方法一

依需求通过 Package Manager 逐一安装 (Install via git)

重要 Package Manager 不会自动安装套件内声明的 git 依赖,安装任一模块前,请先安装其依赖 (依赖标注如下)。

https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/InfiniteScrollView/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/ActionSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/NoticeSystem/Scripts
  • InputSystem (依赖 Unity New InputSystem, OxGKit.LoggingSystem)
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/InputSystem/Scripts
  • TweenSystem (依赖 DoTween Pro, LWMyBox, OxGKit.TimeSystem)
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TweenSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/ButtonSystem/Scripts
  • TimeSystem (依赖 UniTask, OxGKit.LoggingSystem)
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/TimeSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/CursorSystem/Scripts
  • PoolSystem (依赖 UniTask, LWMyBox, OxGKit.LoggingSystem)
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/PoolSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/SingletonSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/SaverSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LocalizationSystem/Scripts
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/VirtualJoystick/Scripts
  • Utilities (依赖 UniTask, LWMyBox, OxGKit.LoggingSystem)
https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts

方法二

直接下载源码 (Code Download ZIP)

复制所需模块的文件夹 (Assets/OxGKit/[模块名]) 到 Unity 项目的 Assets 底下。

提醒 如果没有要自行更改工具组的需求,建议直接使用 Package Manager 方式安装


管理组件导入 (Samples)

各模块皆附有 Example 示例AI Agent Skills,可通过 Package Manager -> 选择模块 -> Samples 进行导入。

提醒 有很多调用的方式,都可以参考各模块的 Samples,里面都有完整的示例。


Build 激活宏

  • OXGKIT_LOGGER_ON (LoggingSystem 日志输出开关,发布时需在 Player Settings -> Scripting Define Symbols 加入才会输出日志)

AI 辅助开发 (AI Agent Skills)

OxGKit 各系统模块皆支持使用 AI 编码代理 (Claude Code、OpenAI Codex CLI、Cursor、Copilot 等) 辅助开发,各模块的 Samples 内置「AI Agent Skills」(SKILL.md),教导 AI 代理正确使用该模块 API。

注意 完整的导入与使用说明,请参考 AI Agent Skills


工具组 API

重要 建议详看各模块的 Example 与 API 章节。