F8 框架初衷:希望自己点击 F8,就能开始制作游戏,不想多余的事。
F8 Framework original intention: Just click F8 and start making the game, don't want to be redundant.
F8 Framework是一个优雅,轻量,符合直觉的基于Unity引擎的游戏框架,组件围绕F8一键启动,不用繁琐的启动配置,最低的心智负担,框架整体遵循以极少的使用成本开发游戏。
Unity 2021、2022、2023、6000
构建可支持:Win / Android / iOS / Mac / Linux / WebGL / 微信小游戏(构建文档,Jenkins集成)
- 1. 热更新版本管理(内置) - 选择打包平台,输出路径,版本号,远程资产加载地址,启用热更新,全量打包,分包,空包。
- 2. 代码热更新(接入HybridCLR) - HybridCLR 是一个特性完整、零成本、高性能、低内存的近乎完美的Unity全平台原生c#热更方案。
- 1. 配置表(内置) - 使用Excel作为配置表,兼顾高性能、高适应性。字段类型分为:基础类型、容器类型,可自由组合类型。点击F8生成的 Excel 二进制文件和C#类,点击F7实时读取 Excel 并替换数据,无需频繁导表,可多端运行时读写Excel。
- 2. 资源加载(内置) - 编辑器下:点击F8自动生成资产索引/AB名称,自动区分不同平台,清理多余AB和文件夹,Editor模式下减少开发周期。运行时:同步/异步加载单个资产,展开文件夹或同一AB下所有资产,自动判断是 Resources / AssetBundle 资产,加载Remote远程资产,获取加载进度,同步打断异步加载。你可以这样加载AssetBundle:单个资产单个AB、指定文件夹名称(文件夹第一层的AB)、设置多个资产为同一AB名(指定任意资产名)
- 3. 模块中心(内置) - 模块中心可以获取所有模块的实例,延迟加载策略,自由控制生命周期。
- 4. 日志管理(内置) - 打印日志,写入文件,上报错误。
- 5. 声音管理(内置) - 声音的播放/暂停/停止/进度控制,音量控制/保存,全局暂停/恢复。Audio分为三大类:背景音乐、人声、特效声。
- 6. 事件管理(内置) - 发送消息事件,事件监听,防止消息死循环,自动释放事件。
- 7. 时间管理(内置) - 提供Timer、FrameTimer两种计时器,暂停/恢复,自动释放Timer。
- 8. 补间动画(内置) - 播放/终止动画,自由组合动画,有旋转/位移/缩放/渐变/填充/震动动画,可根据UI的相对布局位移动画。
- 9. 引用池管理(内置) - 引用池管理,C# 对象,入池/取出/回收/清空。
- 10. 游戏对象池(内置) - 游戏对象池管理,GameObject 预加载池化,生成/销毁/延迟销毁,生命周期事件监听。
- 11. 本地化管理(内置) - 本地化 Text / TextMeshPro / Image / RawImage / SpriteRenderer / Renderer / Audio / Timeline 等组件,使用 Excel 作为多语言翻译表。
- 12. 有限状态机(内置) - 自定义有限状态机 FSMState / FSMSwitch,创建/切换状态/轮询/销毁。
- 13. 下载管理器(内置) - 支持localhost与http地址文件的下载,可本地写入、监听下载进度、断点续传,支持动态添加、移除、暂停、恢复下载。
- 14. UI界面管理(内置) - 处理界面加载、打开、关闭、查询、层级控制、自定义动画、自动获取组件索引。UI界面分为三大类:普通UI、模态弹窗、非模态弹窗,内置各种常用组件。
- 15. 输入系统管理(内置) - 使用同一套代码,通过自定义输入设备,适配多平台,可热切换输入设备,或同时启用多套输入设备。
- 16. 游戏流程管理(内置) - 自定义流程节点 ProcedureNode,控制游戏流程的,添加/运行/轮询/移除。
- 17. 本地数据存储(内置) - 本地数据存储/读取。
- 18. SDK接入管理(内置) - 与原生平台交互,接入多个平台或者渠道SDK,登录/退出/切换/支付/视频广告/退出游戏/原生Toast。
- 19. 网络连接与通信(内置) - 使用 KCP / TCP / WebSocket 网络通讯协议建立长连接通道,支持Client端和Server端。
- Excel.dll:读/写 Excel(已修改缓存地址为Application.persistentDataPath)
- I18N.CJK.dll,I18N.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll:只为读/写 Excel
- ICSharpCode.SharpZipLib:压缩/解压缩
- Mirror(内置):KCP:Reliable UDP
- Mirror(内置):Telepathy:TCP
- Mirror(内置):Websockets:Websockets
- LitJson:序列化/反序列化 JSON(已修改字典Key支持byte,short,int,long,float,double,string 类型,增加Unity常用类型:Type,Vector2,Vector3,Vector4,Quaternion,GameObject,Transform,Color,Color32,Bounds,Rect,RectOffset,LayerMask,Vector2Int,Vector3Int,RangeInt,BoundsInt,修复DateTime精度丢失的问题)
安装git,使用git命令拉取:
git clone https://github.com/TippingGame/F8Framework.git
或者直接下载完整包,放入工程里。
在 Unity 包管理器中,使用 Git URL 添加 F8 核心包。
-
打开 Unity Editor
-
点击菜单的 Window 项,再点击 Package Manager 子项
-
点击左上角 + 号,选择 Add Package from git URL
更新版本号说明,如:1.0.0,第一位代表大版本,第二位代表框架的使用有修改,第三位代表修订版本。(注意:确保更新框架前工程没有报错,更新后点击F8即可)
- 首次导入插件后,需要点击一次 F8
- 游戏启动器:游戏启动器示例(注意:使用框架前必须先启动框架)。GameLauncher.cs
- 模块自定义改名:模块自定义改名。FF8.cs
- qq开发交流群:722647431
- Discord聊天组:https://discord.gg/AHRb7Hwy9R
脑光(TapTap / WebGL) | 消除异世界(微信小游戏 / 4399) | 待定 | 待定 |
---|---|---|---|
The F8 Framework is an elegant, lightweight, and intuitive game framework based on the Unity engine. Centered around the F8 one-click startup, it eliminates tedious configuration and minimizes cognitive load, adhering to the principle of minimal development overhead for game creation.
Unity 2021, 2022, 2023, 6000
Build targets: Win / Android / iOS / Mac / Linux / WebGL / WeChat Mini Games(Build Documentation, Jenkins Integration)
- 1. Hot update version manager (built-in) - Select build platform, output path, version number, remote asset URL, enable hot updates, full build, subpackage, or empty build.
- 2. Code Hot Update (Import HybridCLR) - HybridCLR is a feature-complete, zero-cost, high-performance, low-memory near-perfect Unity cross-platform native C# hot update solution.
- 1. Config table (built-in) - Uses Excel for configuration tables, balancing high performance and adaptability. Field types include basic types and container types, with free combination support. Press F8 to generate Excel binary files and C# classes, or F7 to hot-reload Excel data without frequent exports. Supports runtime read/write across platforms.
- 2. Asset Manager (built-in) - Editor Mode: Press F8 to auto-generate asset indices/AB names, auto-detect platforms, and clean redundant ABs/folders, reducing iteration time. Runtime: Sync/async loading for single assets, folder contents, or shared AB assets. Supports Resources/AssetBundle detection, remote asset loading, progress tracking, and async interruption. AB strategies: per-asset AB, folder-based AB, or custom AB grouping.
- 3. Module Center (built-in) - Centralized module access with lazy-loading and lifecycle control.
- 4. Log Manager (built-in) - Logging, file writing, and error reporting.
- 5. Sound Manager (built-in) - Play/pause/stop/seek controls, volume settings/saving, global pause/resume. Three audio types: BGM, Voice, SFX.
- 6. Event Manager (built-in) - Event dispatch/listening, dead-loop prevention, and auto-cleanup.
- 7. Time Manager (built-in) - Offers Timer and FrameTimer with pause/resume and auto-release.
- 8. Tween Animation (built-in) - Play/stop tweens, composite animations, including rotation/translation/scale/fade/fill/shake, and UI-relative motion.
- 9. Reference Pool Manager (built-in) - C# object pooling: get/release/clear.
- 10. GameObject Pool (built-in) - GameObject pooling with preloading, spawn/destroy/delayed-destroy, and lifecycle events.
- 11. Localization Manager (built-in) - Localizes Text/TextMeshPro/Image/RawImage/SpriteRenderer/Renderer/Audio/Timeline using Excel for translations.
- 12. Finite state machine (built-in) - Custom FSMState/FSMSwitch for state creation/switching/polling/destruction.
- 13. Download Manager (built-in) - Supports localhost/HTTP downloads with local write, progress tracking, and resumable transfers. Dynamic add/remove/pause/resume.
- 14. UI interface manager (built-in) - Handles loading/opening/closing/querying/layering/custom animations/auto-component indexing. UI types: Standard UI, Modal Popup, Non-Modal Popup, with built-in common components.
- 15. Input System Manager (built-in) - Unified multi-platform input via customizable devices, with hot-swapping or multi-device support.
- 16. Game Procedure Manager (built-in) - Custom ProcedureNode for flow control: add/run/poll/remove.
- 17. Local data storage (built-in) - Local data save/load.
- 18. SDK Manager (built-in) - Native platform interoperability: Supports integration with multiple platform/channel SDKs for login/logout/account switching/payments/video ads/game exit/native toast notifications.
- 19. Network Manager (built-in) - Long connections via KCP/TCP/WebSocket for Client/Server.
- Excel.dll:Read/write Excel (cache path modified to Application.persistentDataPath).
- I18N.CJK.dll,I18N.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll:Only for Read/Write Excel
- ICSharpCode.SharpZipLib:Compression/Decompression
- Mirror(built in):KCP:Reliable UDP
- Mirror(built in):Telepathy:TCP
- Mirror(built in):Websockets:Websockets
- LitJson:JSON serialization/deserialization (modified to support dictionary keys of byte, short, int, long, float, double, and string types; added support for commonly used Unity types: Type, Vector2, Vector3, Vector4, Quaternion, GameObject, Transform, Color, Color32, Bounds, Rect, RectOffset, LayerMask, Vector2Int, Vector3Int, RangeInt, BoundsInt; fixed the DateTime precision loss issue)
Install Git, then clone:
git clone https://github.com/TippingGame/F8Framework.git
Or download the package manually.
Add via Unity Package Manager:
-
Open Unity Editor → Window → Package Manager
-
Click + → Add Package from git URL
Versioning: MAJOR.MINOR.PATCH (e.g., 1.0.0). Ensure no errors before updating, then press F8.
- Press F8 after first import.
- GameLauncher: Game Launcher Example (Note: The framework must be initialized before any usage).GameLauncher.cs
- Module renaming: Customize module names.FF8.cs
- Video: 【Unity Framework】F8Framework Introduction.
- Demo Project: https://github.com/TippingGame/F8FrameworkDemo.
- QQ Group: 722647431
- Discord: https://discord.gg/AHRb7Hwy9R