UNITY PROJECT FRAMEWORK - UNITY项目框架
使用Unity项目框架能够快速开发新的中小型游戏,这个框架中包含了以下模块:
· Singleton(单例):
该文件夹包含三个不同的单例脚本。BaseManager 是核心脚本,SingletonMono 继承自 MonoBehaviour,而 SingletonAutoMono 被编写为自动初始化为一个 GameObject。
· ResourceLoad(资源加载):
该组件用于从 Asset 目录中的 Resources 文件夹加载资源,提供了同步和异步加载的方法。
· Mono:
它为那些没有继承自 MonoBehaviour 的脚本和管理器提供一个 Update 方法,使它们能够在Unity的生命周期循环中执行逻辑。
· EventCenter(事件中心):
用于统一处理游戏中的所有事件,简化并促进游戏开发流程。
· Pool(对象池):
该模块实现用于场景中的游戏对象缓冲池。
· Sound(声音管理):
管理游戏中的所有背景音乐和音效。
· Scene(场景管理):
用于控制场景的加载(包括同步和异步加载)。
· Input(输入管理):
管理各种输入事件。
· UI(用户界面):
该模块提供了一种结构化的方法,帮助开发者管理游戏中的UI及UI组件交互背后的逻辑。
To rapidly begin any Unity project, I build a framework that includes:
· Singleton:
This folder comprises three distinct singleton scripts. BaseManager is the essential one, SingletonMono inherits from MonoBehaviour, and SingletonAutoMono is coded to automatically initialize as a GameObject.
· ResourceLoad:
This component is designed to load resources from the “Resources” folder within the Asset directory. It features methods for both synchronous and asynchronous loading.
· Mono:
It provides an “Update” method to scripts and managers that do not inherit from MonoBehaviour, enabling them to execute logic within Unity’s lifecycle loop.
· EventCenter:
This management center is designed to uniformly handle all in-game events. It streamlines and facilitates game development processes.
· Pool:
This module serves as a buffer pool for game objects within the scene.
· Sound:
It manages all background music and sound effects in the game.
· Scene:
This component is to control the (synchronous and asynchronous) loading of scenes.
· Input:
It manages events of different kinds of input.
· UI:
This module offers a structured approach to assist developers in managing in-game UI and the logic behind UI components’ interactions.
Framework Dependency - 框架模块依赖