TERPGDemo/Books/1-快速开始.md
2025-04-22 17:16:40 +08:00

63 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 快速开始- Quickly Start
快速上手
本教程引导从空项目开始体验TEngine。出于简化起见只演示目标平台为Windows的情况。
请在Standalone平台上正确跑通热更新流程后再自行尝试Android、iOS平台的热更新它们的流程非常相似。
### 1.使用Unity2021.3.20f1c1打开项目工程。
### 2.默认选择顶部栏目EditorMode编辑器下的模拟模式并点击Launcher开始运行
![image](src/1-1.png)
### 3.Editor编辑器下运行成功
![image](src/1-2.png)
### 4.打包运行
* 1.运行菜单 HybridCLR/Install... 安装HybridCLR每次更新HybridCLR版本需要重新执行一次安装。
* 2.运行菜单 HybridCLR/Define Symbols/Enable HybridCLR 运行开启HybridCLR热更新。
* 3.运行菜单 HybridCLR/Generate/All 进行必要的生成操作。这一步不可遗漏!!!
* 4.运行菜单 HybridCLR/Build/BuildAssets And CopyTo AssemblyPath生成热更新dll并copy到热更程序集中。
* 5.运行菜单 YooAsset/AssetBundle Builder 构建AB。
* 6.打开Build Settings对话框点击Build And Run打包并且运行热更新示例工程。
### 遇到问题请查看HybridlCLR的<a href="https://hybridclr.doc.code-philosophy.com/docs/help/commonerrors"><strong>常见错误(commonerrors)</strong></a>
### 系统需求
默认版本Unity2021.3.20f1c1
支持版本: Unity2019.4 & Unity2020.3 & Unity2021.3 & Unity2022.3
支持平台: Windows、OSX、Android、iOS、WebGL
开发环境: .NET4.x
### 目录结构
```
Assets
├── AssetArt // 美术资源目录
│ └── Atlas // 自动生成图集目录
├── AssetRaw // 热更资源目录
│ ├── UIRaw // UI图片目录
│ │ ├── Atlas // 需要自动生成图集的UI素材目录
│ │ └── Raw // 不需要自动生成图集的UI素材目录
├── Editor // 编辑器脚本目录
├── HybridCLRData // hybridclr相关目录
├── Scenes // 主场景目录
├── GameScripts // 程序集目录
└── TEngine // 框架核心目录
├── AssetSetting // YooAsset资源设置
├── Editor // TEngine-Editor程序集
└── Runtime // TEngine-Runtime程序集
```
### 热更新程序集划分
```
Assets/GameScripts
├── Main // 主程序程序集(启动器与流程)
└── HotFix // 游戏热更程序集目录 [Folder]
├── GameBase // 游戏基础框架程序集 [Dll]
├── GameProto // 游戏配置协议程序集 [Dll]
└── GameLogic // 游戏业务逻辑程序集 [Dll]
├── GameApp.cs // 热更主入口
└── GameApp_RegisterSystem.cs // 热更主入口注册系统
```