Compare commits

..

606 Commits

Author SHA1 Message Date
Alex-Rachel
745efad95a Update TEngine.Runtime.asmdef 2025-05-16 23:32:50 +08:00
Alex-Rachel
dc27547eeb Update TEngine.Runtime.asmdef 2025-05-16 23:24:15 +08:00
Alex-Rachel
780766e2f0 Update 2025-05-11 19:24:42 +08:00
Alex-Rachel
cc799ce426 Update YooAsset
Update YooAsset
2025-05-10 20:58:24 +08:00
Alex-Rachel
35a9729930 Update SceneSwitcher.cs.meta 2025-05-10 20:55:29 +08:00
Alex-Rachel
0e34c99398 Remove
Remove
2025-05-10 19:25:59 +08:00
Alex-Rachel
240da47fc3 移除LoadSubAssetsSync 2025-05-10 19:25:26 +08:00
ALEX
04109a43b6 Merge pull request #148 from tpxxn/main
fix ExternalTypeUtil namespace
2025-05-09 14:15:44 +08:00
tpxxn
bc82685ec7 fix ExternalTypeUtil namespace 2025-05-09 13:51:47 +08:00
Alex-Rachel
1894cd4d72 Extension for LoadSubSprite
Extension for LoadSubSprite
2025-05-07 12:53:27 +08:00
ALEX
4c903e8da5 Merge pull request #147 from tpxxn/main
refactor AtlasMakerEditor & luban gen code code.lineEnding=crlf &  luban Vector ExternalTypeUtil
2025-05-06 17:22:30 +08:00
tpxxn
03aabf6b08 luban Vector ExternalTypeUtil 2025-05-06 14:15:20 +08:00
tpxxn
c1d9fe5ca7 luban gen code code.lineEnding=crlf 2025-05-06 14:02:24 +08:00
tpxxn
122b5b27ad refactor AtlasMakerEditor 2025-05-06 13:58:02 +08:00
ALEX
9a8de43e95 Merge pull request #145 from lvshiling/main
Fix currentPath DirectorySeparatorChar
2025-05-03 12:13:31 +08:00
lvshiling
06d826d4b2 Fix currentPath DirectorySeparatorChar 2025-04-30 11:42:38 +08:00
ALEX
afd0c6a24e Merge pull request #143 from 6ag/main
修正UIWindow中用于记录UI隐藏的IsHide字段在HideUI时赋值又被覆盖的问题
2025-04-28 18:39:21 +08:00
ALEX
7f9dddaec0 Merge pull request #144 from tpxxn/main
fix GenerateAtlas -> LoadValidSprites
2025-04-28 18:39:09 +08:00
tpxxn
d97538481e fix GenerateAtlas -> LoadValidSprites 2025-04-28 16:14:05 +08:00
feng
c72ef8e197 修正UIWindow中用于记录UI隐藏的IsHide字段在HideUI时赋值又被覆盖的问题 2025-04-28 09:14:14 +08:00
ALEX
7c9393051c Merge pull request #142 from Vorik-S/main
UIModule关闭的倒计时应该先进行判断原计时器是否销毁,避免多次Hide导致计时器多次添加
2025-04-27 17:29:09 +08:00
沈挺
e4c3247546 UIModule关闭的倒计时应该先进行判断原计时器是否销毁,避免多次Hide导致计时器多次添加 2025-04-27 14:08:15 +08:00
Alex-Rachel
6e9d23b2dc WEBGL下的文件系统初始化修正 2025-04-22 16:43:06 +08:00
Alex-Rachel
eae827a600 WEBGL下的remoteServices初始化修正(资源路径走HostServer)
WEBGL下的remoteServices初始化修正(资源路径走HostServer)
2025-04-22 14:25:31 +08:00
Alex-Rachel
f916adb71b 更新YooAsset 2.3.7 -> 2.3.8
更新YooAsset 2.3.7 -> 2.3.8
2025-04-18 00:16:29 +08:00
Alex-Rachel
227283864f 更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
2025-04-17 12:59:23 +08:00
Alex-Rachel
32418326b1 Update ProcedureInitResources.cs 2025-03-28 17:43:17 +08:00
Alex-Rachel
6570f87074 Create SceneSwitcher.cs.meta 2025-03-26 21:10:45 +08:00
ALEX
81b00ae913 Merge pull request #135 from XiaoBojun/main
修改工具栏切换场景布局
2025-03-26 20:58:56 +08:00
XiaoBojun
322aaa0a46 Merge branch 'main' of https://github.com/XiaoBojun/TEngine
# Conflicts:
#	UnityProject/Assets/Editor/ToolbarExtender/Custom/SceneSwitcher/Editor/SceneSwitcher.cs   resolved by main version
2025-03-26 00:30:17 +08:00
XiaoBojun
8f5b1b2117 修改工具栏切换场景布局 2025-03-26 00:23:18 +08:00
Alex-Rachel
54a4c55f3c Remove SceneSwitcher 2025-03-25 23:40:10 +08:00
Alex-Rachel
e37c066f9f 简化流程,支持非强制更新,移除冗余UpdateMainFest与UpdateVersion的流程,因为Yoo统一了编辑器单机和联网的流程了。
简化流程,支持非强制更新,移除冗余UpdateMainFest与UpdateVersion的流程,因为Yoo统一了编辑器单机和联网的流程了。
2025-03-25 19:10:39 +08:00
Alex-Rachel
b1d06ecef5 Update Singleton.cs 2025-03-25 19:09:01 +08:00
Alex-Rachel
27ce7e8ecc Update UpdateSettingEditor.cs 2025-03-25 16:39:14 +08:00
Alex-Rachel
8b715ffc8e 新增Setting面板设置
新增Setting面板设置
2025-03-24 19:11:51 +08:00
Alex-Rachel
e8fa910f1f Main logic assembly missing Tips. 2025-03-24 18:49:42 +08:00
Alex-Rachel
3b3bc7822a Update SceneModule.cs 2025-03-24 17:28:22 +08:00
Alex-Rachel
3c662e489e UpdateSetting Editor不限定路径
UpdateSetting Editor不限定路径
2025-03-24 09:26:26 +08:00
Alex-Rachel
5cebc82ba1 TweenHelper
TweenHelper
2025-03-23 21:06:05 +08:00
Alex-Rachel
5cb72e0b08 Update ResourceExtComponent.Resource.cs 2025-03-23 12:36:41 +08:00
Alex-Rachel
500e012f2e Update TEngine.Runtime.asmdef 2025-03-23 01:08:39 +08:00
Alex-Rachel
82332ba5b4 Utility.Unity.FindObjectOfType 2025-03-23 00:26:33 +08:00
Alex-Rachel
55a6ab1ffb Update Utility.Tween.cs 2025-03-23 00:18:04 +08:00
Alex-Rachel
24313b61ab Utility.Unity Unity6下过时API修正 2025-03-21 20:26:24 +08:00
Alex-Rachel
876b36b3b9 LocalizationTools支持Unity6
LocalizationTools支持Unity6
2025-03-21 20:26:03 +08:00
Alex-Rachel
2a62a1f320 AOT补充元数据默认增加UniTask与YooAsset 2025-03-21 13:20:04 +08:00
Alex-Rachel
b6e6c1c423 AOT补充元数据默认增加UniTask与YooAsset
AOT补充元数据默认增加UniTask与YooAsset
2025-03-21 13:19:27 +08:00
Alex-Rachel
230f6a0be5 Update UpdateSettingEditor.cs 2025-03-21 13:18:56 +08:00
Alex-Rachel
25ca5f3f2b Update BuildDLLCommand.cs 2025-03-21 13:18:51 +08:00
Alex-Rachel
66c5a41be5 增加ENABLE_HYBRIDCLR的宏支持
增加ENABLE_HYBRIDCLR的宏支持
2025-03-21 10:26:12 +08:00
ALEX
61ba472346 Merge pull request #130 from Wkeasy/main
添加重启流程接口
2025-03-21 00:07:49 +08:00
Alex-Rachel
9ce4fb9d88 默认不校验CRC,CRC影响AB加载的速度 2025-03-20 15:12:19 +08:00
Wkeasy
e405236d4d 添加重启流程接口 2025-03-20 14:54:15 +08:00
Alex-Rachel
2e27941755 同步GameApp、Procedure里简化IUpdateDriver的调用 2025-03-20 11:53:35 +08:00
Alex-Rachel
14bbb993f8 YooAsset Extension程序集 因为MIniGame的FileSystem是写死了这个程序集
YooAsset Extension程序集 因为MIniGame的FileSystem是写死了这个程序集
2025-03-20 10:29:49 +08:00
ALEX
0ba9d1a8b7 Merge pull request #129 from 6ag/main
UI脚本生成,区分UIWidget和UIWindow
2025-03-20 00:06:31 +08:00
feng
2818edb575 UI脚本生成,区分UIWidget和UIWindow 2025-03-19 22:04:10 +08:00
Alex-Rachel
5210c1d36b ToolbarExtender
ToolbarExtender
2025-03-19 21:12:28 +08:00
Alex-Rachel
cdc7a8f688 Update SourceGenerator 忽略除了默认程序集的生成
Update SourceGenerator 忽略除了默认程序集的生成
2025-03-19 20:18:09 +08:00
Alex-Rachel
c20f8285d8 Update ResourceModule.Services.cs 2025-03-19 12:55:52 +08:00
Alex-Rachel
f2a63978da 增加MiniGameFileSystem的支持,增加EncryptType的解密枚举类型,以及ResourceModule解密方法实现
增加MiniGameFileSystem的支持,增加EncryptType的解密枚举类型,以及ResourceModule解密方法实现
2025-03-19 12:40:13 +08:00
Alex-Rachel
36db2f3aba 增加UnLoadAsync, 调整LoadSceneAsync的命名,增加_handlingScene当前正在处理的Scene保护
增加UnLoadAsync, 调整LoadSceneAsync的命名,增加_handlingScene当前正在处理的Scene保护
2025-03-19 09:30:27 +08:00
Alex-Rachel
61b2baeaf7 LocalizationUtility 命名规范 2025-03-18 22:34:43 +08:00
ALEX
7aab91215c Merge pull request #128 from 6ag/main
脚本自动生成增加Toggle
2025-03-18 19:31:55 +08:00
feng
4ae417337b 脚本自动生成增加Toggle 2025-03-18 18:56:37 +08:00
Alex-Rachel
52ac77d5e4 SceneModule增加UniTask的LoadScene方法 2025-03-18 14:39:08 +08:00
Alex-Rachel
515d55e19a Update UpdateSettingEditor.cs 2025-03-18 14:37:24 +08:00
Alex-Rachel
a4221e36f8 HotUpdateAssemblies 剔除.dll后缀
HotUpdateAssemblies 剔除.dll后缀
2025-03-18 13:46:32 +08:00
Alex-Rachel
58cecd2071 Update UpdateSettingEditor.cs 2025-03-18 00:36:34 +08:00
Alex-Rachel
81a794cff3 Update Utility.Http.cs 2025-03-18 00:24:54 +08:00
Alex-Rachel
5e6d98764c Update GameModule.cs 2025-03-18 00:21:56 +08:00
Alex-Rachel
385de69cb9 规范化LocalizationModule 2025-03-18 00:20:44 +08:00
Alex-Rachel
b68a5a84b9 自动同步UpdateSetting到HybridCLRSetting 2025-03-17 18:51:52 +08:00
Alex-Rachel
8ede4c7faa 增加DisStripCode防止裁剪组件 2025-03-17 18:28:26 +08:00
Alex-Rachel
f4d89bb420 EmitHelper动态方法不支持IL2CPP 2025-03-17 17:31:42 +08:00
Alex-Rachel
202df9ff62 GetUIAsyncAwait CancellationToken nullable 2025-03-17 14:11:11 +08:00
Alex-Rachel
e4989425e8 优化Activator.CreateInstance, 已知类型优先使用new 代替反射,其次使用EmitHelper。耗时对比:直接new 1,EmitHelper 3, Activator 10。 2025-03-17 12:01:25 +08:00
ALEX
a7b6d6f478 Merge pull request #126 from tpxxn/main
ShellHelper 在 Unity 输出 Log
2025-03-17 02:51:52 +08:00
tpxxn
db3fd11cb2 ShellHelper 在 Unity 输出 Log 2025-03-17 00:23:27 +08:00
Alex-Rachel
a2fe29af24 GameApp #pragma warning disable CS0436 2025-03-16 23:47:28 +08:00
Alex-Rachel
bf92b4d568 GameApp #pragma warning disable CS0436 2025-03-16 23:46:33 +08:00
Alex-Rachel
b060057c36 合理化目录结构,UIScriptGenerator、AssetBundleCollector挪到Assets/Editor目录下方便用户自行修改。 2025-03-16 18:41:49 +08:00
Alex-Rachel
9bffcce30e UIScriptGenerator 2025-03-15 00:42:23 +08:00
Alex-Rachel
be3b6eb8f2 newtonsoftJson 2025-03-14 23:41:13 +08:00
ALEX
a61d8bd668 Merge pull request #125 from yuliuren/main
Atlas工具增加2021版本支持
2025-03-14 20:16:50 +08:00
陈思海
fae2afd3c8 Atlas工具增加2021版本支持
目前支持2021.x  ~ 6000.x
2025-03-14 19:56:05 +08:00
ALEX
a309cd2f98 Merge pull request #124 from yuliuren/main
新增Altas图集编辑器
2025-03-14 16:15:26 +08:00
陈思海
3dc478c509 modify
修改初次报错
2025-03-14 16:00:05 +08:00
陈思海
c728dc4c0f 新增Altas图集编辑器
增加可视化定制化的路径配置
增加图集冗余机制判断 自动更新自动移除冗余依赖图集
增加各平台打包图集设定
增加V2和v1图集切换打包 ps:新旧想用哪个都行
2025-03-14 15:52:23 +08:00
Alex-Rachel
e9d6c27006 ShowUIAsyncAwait 2025-03-13 19:46:14 +08:00
Alex-Rachel
33bdcbd913 Update SpritePostprocessor.cs 2025-03-13 10:30:16 +08:00
Alex-Rachel
ac236e4b6a Merge branch 'main' of https://github.com/Alex-Rachel/TEngine 2025-03-13 10:27:22 +08:00
Alex-Rachel
d6f5e65ab4 规范化protected的Fields 命名规范。
protected一定程度上与private类似,外部无法访问。
2025-03-13 10:27:16 +08:00
ALEX
95412017e3 Merge pull request #122 from 6ag/main
SpritePostprocessor回退,已注释新版内容
2025-03-12 20:59:04 +08:00
feng
07f02acb1e 整理SpritePostprocessor图集打包脚本 2025-03-12 20:57:42 +08:00
feng
c03170e860 SpritePostprocessor回退,已注释新版内容 2025-03-12 20:52:03 +08:00
Alex-Rachel
aa5dc9dcb4 Update GameEntry.cs 2025-03-12 18:46:08 +08:00
ALEX
53665f669c Merge pull request #120 from 6ag/main
修复Image/SpriteRenderer设置Sprite时,类型转换错误
2025-03-12 17:34:52 +08:00
feng
91403615bc 修复Image/SpriteRenderer设置Sprite时,类型转换错误 2025-03-12 17:32:37 +08:00
ALEX
77b2fdceb8 Merge pull request #119 from 6ag/main
给UIModule中UI摄像机赋值
2025-03-12 16:50:05 +08:00
feng
7b7b14a8c3 给UIModule中UI摄像机赋值 2025-03-12 16:39:44 +08:00
ALEX
c7f3511bd3 Merge pull request #118 from 6ag/main
设置图片支持CancellationToken取消
2025-03-12 14:32:01 +08:00
Alex-Rachel
e089aead36 Update ProcedureInitResources.cs 2025-03-12 14:31:21 +08:00
feng
d169b62fc5 设置图片支持CancellationToken取消 2025-03-12 14:26:38 +08:00
Alex-Rachel
ab10c587f8 Fixed AudioSetting.asset 2025-03-12 13:18:38 +08:00
Alex-Rachel
bbeecb2855 LanguageModule And Procedure InitLanguage 2025-03-12 13:18:21 +08:00
Alex-Rachel
39c9d327a1 Update BattleMainUI.prefab 2025-03-12 13:17:06 +08:00
Alex-Rachel
50c72fb341 Update README.md 2025-03-12 12:13:58 +08:00
Alex-Rachel
b0c357bba2 Change the TestEvent 2025-03-12 12:13:51 +08:00
Alex-Rachel
6a1ea3d9b8 Update UpdateSetting.cs 2025-03-12 12:13:31 +08:00
Alex-Rachel
6a6caebcff Update GameEvent.cs 2025-03-12 12:13:21 +08:00
Alex-Rachel
e3bf57f485 Update ResourceModule.cs 2025-03-12 12:13:05 +08:00
Alex-Rachel
77d07e175a LubanTools支持 2025-03-12 11:40:05 +08:00
Alex-Rachel
106d90da4d 整理Attribute CodeStype 2025-03-10 00:20:22 +08:00
ALEX
dd471eed08 Merge pull request #116 from tpxxn/main
const 变量名
2025-03-09 08:18:25 +08:00
tpxxn
f32e5e79a3 const 变量名 2025-03-09 02:33:14 +08:00
Alex-Rachel
4c325f7ca6 Update MainScene 2025-03-08 22:51:28 +08:00
Alex-Rachel
d11b6e628e Update HostMode Procedure 2025-03-08 21:21:25 +08:00
Alex-Rachel
5e568b203b HybridCLR BuildDLLCommond 2025-03-08 21:03:18 +08:00
Alex-Rachel
5bb168a958 Rmv 2025-03-08 19:44:33 +08:00
Alex-Rachel
6cf5aa46c1 统一命名规范private变量_filedInfo 2025-03-08 19:44:06 +08:00
Alex-Rachel
9b72cbcb7c ProjectSettings 2025-03-08 18:38:40 +08:00
Alex-Rachel
32fbb971e7 Utility.Http 2025-03-08 14:18:35 +08:00
Alex-Rachel
d6d2f66902 Utility.PlayerPref 2025-03-08 14:05:41 +08:00
Alex-Rachel
4a1876897c Utility.Unity 2025-03-08 13:46:35 +08:00
Alex-Rachel
551727687f TEngine 6 2025-03-07 23:09:46 +08:00
Alex-Rachel
aad8ff3ee5 忽略Gizmos和编辑器资源 source:9bc0577423 2025-01-24 12:59:31 +08:00
Alex-Rachel
df25a1adad Update ResourceExtComponent.Resource.cs
typo
2025-01-22 09:27:42 +08:00
Alex-Rachel
634a392a1f Update HybridCLR -> 7.3.0
Update HybridCLR -> 7.3.0
2025-01-15 23:54:31 +08:00
Alex-Rachel
b869a05220 #104 目前调用 HideUI 会将 UIWindow 的 Visible 设置为 false,但是如果又调用 CloseUI 方法,会将刚才 Visible 设置为 false 的窗口重新设置为 true。 2024-12-22 13:13:59 +08:00
ALEX
37d88c2d94 Merge pull request #103 from 6ag/main
更新文档
2024-12-17 10:07:14 +08:00
feng
f3aa8824d8 更新文档 2024-12-17 10:03:53 +08:00
ALEX
99c5afcbc5 Merge pull request #102 from 6ag/main
UIWindow新增Hide方法,将UIWindow中的UserData和UserDatas属性移动到UIBase
2024-12-16 23:46:33 +08:00
feng
4075588c34 UIWindow新增Hide方法,将UIWindow中的UserData和UserDatas属性移动到UIBase 2024-12-16 22:36:26 +08:00
Alex-Rachel
fdd9f34132 Merge branch 'main' of https://github.com/ALEXTANGXIAO/TEngine 2024-12-09 11:34:17 +08:00
Alex-Rachel
a2ab6efc71 #101 2024-12-09 11:34:05 +08:00
ALEX
67025c806e Update README.md 2024-12-09 11:12:02 +08:00
ALEXTANGXIAO
38afa45f9c #100 2024-12-04 10:45:19 +08:00
ALEXTANGXIAO
0dc572f43e #97 2024-12-02 23:51:53 +08:00
ALEXTANGXIAO
0679d924c1 Merge branch 'main' of https://github.com/ALEXTANGXIAO/TEngine 2024-12-02 23:48:12 +08:00
ALEXTANGXIAO
3de8cad99a #99 2024-12-02 23:46:08 +08:00
ALEX
065d5a7303 Merge pull request #98 from 6ag/main
适配 luban-next 最新版本的配表结构,新增 Mac 设备相关的 shell 脚本支持
2024-11-30 23:29:45 +08:00
feng
c089eb32ba 适配 luban-next 最新版本的配表结构,新增 Mac 设备相关的 shell 脚本支持 2024-11-30 23:09:45 +08:00
ALEXTANGXIAO
d571a937f8 UIWindow同一帧关闭导致GameObject无法销毁的极小概率bug修复 2024-11-22 23:09:44 +08:00
ALEXTANGXIAO
89210483a9 ScriptGenerator控制台日志 2024-10-16 22:56:39 +08:00
ALEXTANGXIAO
058ac2c9a5 RemoveAllListenerByOwner 倒序移除 2024-10-11 21:47:21 +08:00
ALEXTANGXIAO
990222c7c6 资源释放时序优化 2024-10-05 15:18:51 +08:00
ALEXTANGXIAO
d3914a96bb Merge branch 'main' of https://github.com/ALEXTANGXIAO/TEngine 2024-09-20 22:43:29 +08:00
ALEXTANGXIAO
4b178a9fa9 #80 2024-09-20 22:43:08 +08:00
ALEXTANG
79929c4ac3 Merge pull request #95 from landoU/main
修正:异步获取窗口方法GetUIAsync获取不到已加载的窗口
2024-09-20 22:29:28 +08:00
liufeiwei
38fa4d5cbc 修正:异步获取窗口方法GetUIAsync获取不到已显示的窗口 2024-09-18 09:42:12 +08:00
ALEXTANG
3ac6977f93 Rmv 2024-09-02 16:40:19 +08:00
ALEXTANGXIAO
3facec8f93 Update ProcedureInitPackage.cs 2024-08-25 19:09:07 +08:00
ALEXTANGXIAO
0570982b97 * support package mode tengine setting
* support package mode tengine setting
2024-08-25 19:07:11 +08:00
ALEXTANG
f785264873 #94 资源加载assetLoadingList处理
#94 资源加载assetLoadingList处理
2024-08-24 21:02:12 +08:00
ALEXTANGXIAO
4911ec074c 新增GetUIAsync,ShowUIAsyncAwait
新增GetUIAsync,ShowUIAsyncAwait
2024-08-11 10:24:27 +08:00
ALEXTANGXIAO
6ff9546152 Update RedNoteMgr.cs 2024-08-10 22:21:17 +08:00
ALEXTANG
5a8dc04b9c Merge pull request #92 from Kojima648/main
[opt] TEngine 设置界面逻辑优化
2024-08-10 17:24:37 +08:00
chengshengfei
d4482cf1c4 [opt]
中文:优化设置界面的tab切换,页面数据保存逻辑
English: Optimize tab switching and page data saving logic in the settings interface
2024-08-10 16:47:30 +08:00
ALEXTANG
c7fad139ba Merge pull request #91 from mi1890/main
* [fix] installed  as a  package ,class not found issue
2024-08-09 00:43:18 +08:00
mr.zz
650469a7db * support package mode tengine setting 2024-08-09 00:25:48 +08:00
mr.zz
c7c00eac9f * [fix] installed as a package ,class not found issue 2024-08-07 23:58:47 +08:00
ALEXTANG
5a883bc8ec Merge pull request #88 from kenkinky/main
[fixed]选中ResourceModule时进入Play模式抛出异常
2024-08-03 18:55:40 +08:00
BCC
79c1026c7c [fixed]选中ResourceModule时进入Play模式抛出异常 2024-08-02 12:54:25 +08:00
ALEXTANGXIAO
f2c69d58b2 DefaultLogger支持Unity6 2024-07-14 14:51:44 +08:00
ALEXTANGXIAO
c38d3b7cfa 支持Unity6 2024-07-14 14:37:43 +08:00
ALEXTANGXIAO
98cb74537a update hybridclr_version & UnityPackage Version 2024-07-14 14:32:00 +08:00
ALEXTANGXIAO
ed19a75be9 Update GameApp_RegisterSystem.cs 2024-07-14 14:30:43 +08:00
ALEXTANG
fd82ddf427 Merge pull request #85 from Vorik-S/main
加载热更新程序集的崩溃bug修正
2024-07-11 12:23:12 +08:00
沈挺
e53ceb0095 单例对象销毁时的检查,修正由此错误的销毁单例对象的bug 2024-07-09 18:49:55 +08:00
沈挺
9afda78735 修正GameApp_RegisterSystem文件漏写基类导致真机上无法正确执行GameApp.Instance.Active方法的bug 2024-07-09 17:23:24 +08:00
沈挺
5734d4f995 加载热更新程序集的崩溃bug修正 2024-07-09 16:11:41 +08:00
ALEXTANG
dc7ab7fd64 Merge branch 'main' of https://github.com/ALEXTANGXIAO/TEngine 2024-06-27 21:02:55 +08:00
ALEXTANG
fcb3416acd Update ResourceManager.cs 2024-06-27 21:02:47 +08:00
ALEXTANG
3df18c006d Merge pull request #82 from SaberArtoriaFan/Dev2
扩展绑定TE UI框架的便捷工具
2024-06-21 14:19:12 +08:00
EdwardLee
6cfae215dc 11 2024-06-21 00:59:26 +08:00
ALEXTANG
1aaa46c82c 资源模块增加设置:是否使用系统释放无用资源策略。
资源模块增加设置:是否使用系统释放无用资源策略。
2024-06-20 09:42:49 +08:00
ALEXTANG
ca79adce7c Merge pull request #79 from Severn17/main
新增WebGL一键打包功能 及 全平台运行增加WebGL示例图片
2024-06-17 15:22:15 +08:00
yangshiqi
b520eba187 新增WebGL一键打包功能 及 全平台运行增加WebGL示例图片 2024-06-14 15:09:01 +08:00
ALEXTANG
b5afaca217 Merge pull request #78 from Senfee-Cheng/main
[fix] 在注册事件之前调用初始化
2024-06-13 17:32:39 +08:00
chengshengfei
ea2efbf588 [fix] 在注册事件之前调用初始化 2024-06-13 16:21:40 +08:00
ALEXTANG
a4b1befc5a Merge pull request #77 from Senfee-Cheng/main
[opt] (编辑器下)如果有多个资源的Package,组件提供一个下拉,使用Yoo收集器的列表
2024-05-28 19:22:53 +08:00
ALEXTANG
8dcddfa328 Update EventInterfaceGenerate.cs 2024-05-28 19:19:01 +08:00
chengshengfei
dd37d130da [opt] (编辑器下)如果有多个资源的Package,组件提供一个下拉,使用Yoo收集器的列表 2024-05-28 19:16:45 +08:00
ALEXTANG
24d7dbc677 EventInterfaceGenerate支持List与Dictionary(但不推荐用)
EventInterfaceGenerate支持List与Dictionary(但不推荐用)
2024-05-28 18:09:13 +08:00
ALEXTANG
491100b932 Merge pull request #76 from Senfee-Cheng/main
[opt] 优化下载更新界面的显示
2024-05-28 16:55:42 +08:00
chengshengfei
c84c21574d [opt] 优化下载更新界面的显示 2024-05-28 15:56:05 +08:00
ALEXTANG
7914660f8c Update SingletonSystem.cs 2024-05-24 14:00:51 +08:00
ALEXTANG
b00679a276 Merge pull request #75 from SunXuebing/main
调整编辑器模式下模块销毁顺序,解决编辑器退出运行后资源管理器销毁了还被调用问题
2024-05-20 14:17:40 +08:00
sxb
cd9a10ccac Update RootModule.cs
修复条件判断
2024-05-20 13:31:57 +08:00
sxb1067
f11098d32e 调整编辑器模式下模块销毁顺序,解决编辑器退出运行后资源管理器销毁了还被调用问题 2024-05-20 11:25:01 +08:00
ALEXTANGXIAO
db6e715fa6 Update ActorEventDispatcher.cs 2024-05-19 22:03:53 +08:00
ALEXTANG
c2edf71ee4 Update AssetItemObject.cs 2024-05-17 17:55:53 +08:00
ALEXTANG
75af7c22c7 Merge pull request #73 from Senfee-Cheng/main
[fix] 移除 `BuildDLLCommand` 构造函数以尝试解决hotfix dll数组被清除的问题
2024-05-17 15:48:27 +08:00
chengshengfei
2f9edf83bf Merge branch 'main' of github.com:Senfee-Cheng/TEngine 2024-05-17 15:45:26 +08:00
chengshengfei
815095efaf [fix] 移除 BuildDLLCommand 构造函数以尝试解决数组被清除的问题 2024-05-17 15:45:06 +08:00
ALEXTANG
3101a64a48 Merge pull request #72 from Severn17/main
yooasset 微信小游戏设置,详情看yooasset微信小游戏支持解决方案文档
2024-05-16 16:05:41 +08:00
yangshiqi
457e0f36a4 yooasset 微信小游戏设置,详情看yooasset微信小游戏支持解决方案文档 2024-05-16 15:19:32 +08:00
ALEXTANG
0bd30def23 移除示例package文件 2024-05-16 13:16:25 +08:00
ALEXTANG
d24db83c8b Update 99-各平台运行RunAble.md 2024-05-16 12:34:55 +08:00
ALEXTANG
18a2840777 Merge pull request #70 from Senfee-Cheng/main
[Platform] Supports console
2024-05-16 10:26:13 +08:00
chengshengfei
1d901514e1 新的平台支持[Sony Console] 2024-05-16 10:18:03 +08:00
chengshengfei
983279c56d 更新文档,添加新增的支持的平台。 2024-05-16 10:14:22 +08:00
ALEXTANG
e9540c620a Merge pull request #69 from Severn17/main
修改编辑器下webgl  平台名字 宏问题
2024-05-14 17:57:38 +08:00
yangshiqi
39be280d88 修改编辑器下webgl 平台名字 宏问题 2024-05-14 17:45:40 +08:00
ALEXTANG
f9f9122027 单例系统完善生命周期、支持Dispose 2024-05-13 14:09:32 +08:00
ALEXTANG
682a0bd786 Update UnityExtension.cs 2024-05-08 17:11:39 +08:00
ALEXTANG
34c514cae8 Update README.md 2024-05-08 10:31:41 +08:00
ALEXTANG
c707cc1a38 GameApp Shutdown 2024-05-08 10:06:33 +08:00
ALEXTANG
f016fdd0a6 Update ReleaseTools.cs 2024-05-07 20:09:15 +08:00
ALEXTANG
4c0f5a77f9 支持编辑器下EnterPlayMode Options 2024-05-07 18:05:41 +08:00
ALEXTANG
ae0d00424f Update ProfilerDefineSymbols.cs 2024-04-30 17:42:36 +08:00
ALEXTANG
c8ecac5815 Update README.md 2024-04-29 12:27:40 +08:00
ALEXTANG
4f8c1cdfdd 修正SpritePostprocessor处理Atlas的override 2024-04-25 15:43:44 +08:00
ALEXTANG
dff043e075 Update SahderVariantCollect
Update SahderVariantCollect
2024-04-24 11:17:38 +08:00
ALEXTANG
e69dc47b8f 修正编辑器调用转表bat 当前路径的问题
修正编辑器调用转表bat 当前路径的问题
2024-04-17 14:27:28 +08:00
ALEXTANG
fc2ef0714c 设置DefaultYooFolderName为package。原本设置默认为yoo。
设置DefaultYooFolderName为package。原本设置默认为yoo。
2024-04-15 19:58:57 +08:00
ALEXTANG
d75c1c8c93 升级YooAsset->2.1.1、UniTask->2.5.4
升级YooAsset->2.1.1、UniTask->2.5.4
2024-04-15 19:37:42 +08:00
ALEXTANG
83bea559e4 Merge pull request #65 from Senfee-Cheng/main 2024-04-12 18:19:10 +08:00
ALEXTANG
26689639ed Merge pull request #64 from ZemelLing/dev-launcher 2024-04-12 18:17:06 +08:00
chengshengfei
bd6ac5f4da 优化代码。 2024-04-12 10:58:06 +08:00
ZemelLing
70dcb03a3f 确保Launcher打开的main场景,而不是其他名称里包含main的场景。 2024-04-11 13:09:16 +08:00
ALEXTANG
59b3649155 优化框架轮询逻辑 ,用脏数据构建Execute数组。
优化框架轮询逻辑 ,用脏数据构建Execute数组。
2024-04-08 15:37:06 +08:00
ALEXTANG
2c025efe3b 修正预加载流程 2024-04-08 14:41:16 +08:00
ALEXTANG
7ae6ef94ba 修正同时对一个图片进行异步SetSprite的处理
修正同时对一个图片进行异步SetSprite的处理
2024-04-07 15:45:32 +08:00
ALEXTANG
d5bb64b314 资源异步加载从缓存中延迟分帧处理。 2024-04-07 15:33:45 +08:00
ALEXTANG
4c34858ce0 Update SettingsUtils.cs 2024-03-29 15:24:02 +08:00
ALEXTANG
5adb2f83e5 Update AssetBundleCollectorSetting.asset 2024-03-29 14:38:44 +08:00
ALEXTANG
f10a89180e 支持边玩边下载,合理化webgl下的流程
支持边玩边下载,合理化webgl下的流程
2024-03-28 15:55:27 +08:00
ALEXTANG
3e3314858e 优化加载游戏物体接口,常用Parent参数前置,编辑器模式下增加超时保护提示
优化加载游戏物体接口,常用Parent参数前置,编辑器模式下增加超时保护提示
2024-03-25 14:27:42 +08:00
ALEXTANGXIAO
da57ed845f 修正同时对一个资源进行异步加载的处理
修正同时对一个资源进行异步加载的处理
2024-03-24 15:58:57 +08:00
ALEXTANGXIAO
df570f453a Create UnityEditor.iOS_I2Loc.Xcode.dll 2024-03-24 15:50:44 +08:00
ALEXTANG
a500a08a30 更新Luban配置表使用文档 2024-03-19 14:25:48 +08:00
ALEXTANG
2daac0e065 默认一键打包使用ClearAndCopyAll 2024-03-19 14:09:27 +08:00
ALEXTANG
514da6e99e Update README.md 2024-03-18 15:44:29 +08:00
ALEXTANG
7f91241df7 Update Version.cs 2024-03-18 15:06:48 +08:00
ALEXTANG
071974ab4f Update GameLogic.asmdef 2024-03-18 15:05:40 +08:00
ALEXTANG
c01e03ff70 Update AssetBundleCollectorSetting.asset 2024-03-18 15:02:23 +08:00
ALEXTANG
6fec792e05 TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
2024-03-18 14:53:26 +08:00
ALEXTANG
04ecf71eab Update ProcedureLoadAssembly.cs 2024-02-27 12:05:26 +08:00
ALEXTANG
693ca5bb3d 编辑器模式重定向所有热更dll,以防编辑器运行AB时出现两份元数据。
编辑器模式重定向所有热更dll,以防编辑器运行AB时出现两份元数据。
2024-01-25 15:10:30 +08:00
ALEXTANG
90f84a2764 更新README
更新README
2023-12-20 12:43:39 +08:00
ALEXTANG
6107b41770 修正动态添加/异步添加ui组件的脏数据问题
修正动态添加/异步添加ui组件的脏数据问题
2023-12-19 18:24:33 +08:00
ALEXTANG
1423a3716a 编辑器模式重定向所有热更dll,以防编辑器运行AB时出现两份元数据。
编辑器模式重定向所有热更dll,以防编辑器运行AB时出现两份元数据。
2023-12-18 19:49:46 +08:00
ALEXTANG
6a87db76ee 优化局部单位事件分发器ActorEventDispatcher,EventRegInfo池化
优化局部单位事件分发器ActorEventDispatcher,EventRegInfo池化
2023-12-15 15:11:12 +08:00
ALEXTANG
3a6170dca6 Update UIWidget.cs 2023-12-15 14:25:41 +08:00
ALEXTANG
9d137d613a 修正Utility.Unity注入非Mono的LateUpdate时序问题
修正Utility.Unity注入非Mono的LateUpdate时序问题
2023-12-15 14:15:08 +08:00
ALEXTANG
ba77ec6b45 Update EventInterfaceGenerate.cs 2023-12-14 15:07:04 +08:00
ALEXTANG
b661da68f2 Update EventInterfaceGenerate.cs 2023-12-14 10:12:56 +08:00
ALEXTANGXIAO
e1040110bb 升级拓展GameEvent,支持基于Interface的方法调用抛出事件,以及自动化根据声明的Interface来生成实现代码。
升级拓展GameEvent,支持基于Interface的方法调用抛出事件,以及自动化根据声明的Interface来生成实现代码。
2023-12-13 23:27:54 +08:00
ALEXTANGXIAO
2d53fa1687 升级HybridCLR 4.0.13=>4.0.14
升级HybridCLR 4.0.13=>4.0.14
2023-12-13 19:27:05 +08:00
ALEXTANG
c4ef07f13e Update UnityExtension.cs 2023-12-12 13:00:53 +08:00
ALEXTANG
1f2d99ddc9 修正UIWindow资源句柄时序导致UI同步显示失效的问题。 2023-12-08 10:38:19 +08:00
ALEXTANG
edf4925a7a UIWidget增加Visible设置
UIWidget增加Visible设置
2023-12-07 16:32:54 +08:00
ALEXTANG
5d67238c8f 统一封装对shader的管理和示例。
统一封装对shader的管理和示例。
2023-12-07 10:55:50 +08:00
ALEXTANG
6cfd352482 关闭ResourceCacheMgr测试日志
关闭ResourceCacheMgr测试日志
2023-12-07 10:30:50 +08:00
ALEXTANG
40373c473d 修改通过Tag加载资源对象集合接口。(Operation需要自行管理生命周期释放)
修改通过Tag加载资源对象集合接口。(Operation需要自行管理生命周期释放)
2023-12-07 10:27:17 +08:00
ALEXTANG
d799f9fdf0 优化资源引用类与资源分组类。 2023-12-06 17:57:54 +08:00
ALEXTANG
15735c3d2d 修正循环列表GetItem,增加普通列表组件。 2023-12-06 14:41:31 +08:00
ALEXTANG
818a74f437 释放资源前判断资源合法性 2023-12-06 11:35:33 +08:00
ALEXTANG
f248757401 消除Editor引用隐患
消除Editor引用隐患
2023-12-01 17:41:43 +08:00
ALEXTANG
6ada0e7de7 移除测试日志 2023-12-01 17:18:13 +08:00
ALEXTANG
7ea472f97e 修正日志重定向下层日志跳转功能
修正日志重定向下层日志跳转功能
2023-12-01 10:45:57 +08:00
ALEXTANG
fb8528ff52 音频代理类增加暂停和取消暂停接口。
音频代理类增加暂停和取消暂停接口。
2023-11-30 16:17:35 +08:00
ALEXTANG
e3ac92ef46 修正音频模块回收池
修正音频模块回收池
2023-11-30 15:30:01 +08:00
ALEXTANG
be6a19c26a 修正Sound轨道不受SoundVolume的影响,调整AudioMixer音频Group命名
修正Sound轨道不受SoundVolume的影响,调整AudioMixer音频Group命名
2023-11-30 13:18:20 +08:00
ALEXTANG
e7f0636f30 拓展细分内存对象生命周期。
拓展细分内存对象生命周期。
2023-11-30 00:13:23 +08:00
ALEXTANG
fb38e96e9e 修正循环列表根据下标获取索引Item
修正循环列表根据下标获取索引Item
2023-11-29 19:48:18 +08:00
ALEXTANG
dd658c7e1d 对象池支持ShutDown
对象池支持ShutDown
2023-11-29 15:39:44 +08:00
ALEXTANG
4d7cb7641d 修正LoadGameObjectAsync接口传参
修正LoadGameObjectAsync接口传参
2023-11-29 15:24:02 +08:00
ALEXTANG
ae075b1fad 修正ProcedureDownloadFile更新时网速计算
修正ProcedureDownloadFile更新时网速计算
2023-11-29 12:55:36 +08:00
ALEXTANG
02827ce3b8 优化/新增超牛逼且很方便使用的对象池。
优化/新增超牛逼且很方便使用的对象池。
2023-11-28 19:36:26 +08:00
ALEXTANG
1a0e3f91e0 优化/新增超牛逼且很方便使用的对象池。
优化/新增超牛逼且很方便使用的对象池。
2023-11-28 15:27:34 +08:00
ALEXTANG
6d376b0e07 增加安全定时器GameTimerTick
增加安全定时器GameTimerTick
2023-11-28 14:25:25 +08:00
ALEXTANGXIAO
cb73c9a9eb 升级HybridCLR 4.0.12=>4.0.13 强烈建议升级,修复了若干bug
升级HybridCLR 4.0.12=>4.0.13 强烈建议升级,修复了若干bug
2023-11-27 22:47:30 +08:00
ALEXTANG
7dda73a7ac 增加泛用加载资源并绑定资源引用到GameObject上。
增加泛用加载资源并绑定资源引用到GameObject上。
2023-11-23 13:34:33 +08:00
ALEXTANG
9bcb636ed7 修正SetSprite接口绑定资源引用关系,避免0引用导致AssetBundle被释放使图片丢失。
修正SetSprite接口绑定资源引用关系,避免0引用导致AssetBundle被释放使图片丢失。
2023-11-23 11:44:43 +08:00
ALEXTANG
bd0cfc5577 增加计时器TimerModule。
增加计时器TimerModule。
2023-11-22 12:20:08 +08:00
ALEXTANG
ff613e4130 更新修复导入图集初始化信息不全的bug
更新修复导入图集初始化信息不全的bug
2023-11-20 17:49:08 +08:00
ALEXTANG
fea1ae2278 Merge pull request #59 from AlanWeekend/main
优化分包资源下载逻辑,统一WebGL平台与其他平台的远程热更资源引用方式
2023-11-20 11:56:04 +08:00
Weekend
866c440479 add:初始化Package流程中增加webgl平台更新update配置 2023-11-19 02:01:15 +08:00
Weekend
48ff839d64 Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-11-19 01:43:59 +08:00
Weekend
69be3cfa23 update:统一WebGL平台与其他平台的远程热更资源引用方式 2023-11-19 01:41:47 +08:00
Weekend
5f2c27ecf0 Merge branch 'ALEXTANGXIAO:main' into main 2023-11-18 21:46:00 +08:00
Weekend
ef17cd851b add:优化分包下载 2023-11-18 21:44:24 +08:00
ALEXTANG
f186d6b058 Merge pull request #58 from AlanWeekend/main
增加初始化指定资源包操作,单独下载指定地址的资源文件
2023-11-16 10:52:14 +08:00
Weekend
4385123976 add:设置图片资源支持从指定资源包中加载 2023-11-15 15:39:04 +08:00
Weekend
1334dc30f9 Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-11-15 15:15:11 +08:00
Weekend
af822add2c add:下载资源包中指定地址的资源文件 2023-11-15 15:14:47 +08:00
Weekend
ffb1f214ad Merge branch 'ALEXTANGXIAO:main' into main 2023-11-15 14:41:45 +08:00
Weekend
213aaed426 add:初始化指定资源包 2023-11-15 14:40:35 +08:00
ALEXTANG
623d301e41 修正异步创建子Widget时SetParent的问题
修正异步创建子Widget时SetParent的问题
2023-11-15 14:06:49 +08:00
ALEXTANG
2870383afe Resource模块支持操作指定资源包的资源
Resource模块支持操作指定资源包的资源
2023-11-15 10:48:28 +08:00
ALEXTANG
1ad435958a Merge pull request #57 from AlanWeekend/main
add:Resource模块支持操作指定资源包的资源
2023-11-15 10:08:53 +08:00
Weekend
386787c6ec add:Resource模块支持操作指定资源包的资源 2023-11-15 00:14:07 +08:00
ALEXTANG
cd65dde4c3 ReleasePreLoadAssets修正在webgl模式下Shutdown的问题
ReleasePreLoadAssets修正在webgl模式下Shutdown的问题
2023-11-14 16:00:09 +08:00
ALEXTANG
8321e77421 Merge pull request #56 from AlanWeekend/main
fixed:looplistitem重复赋值问题
2023-11-13 13:09:25 +08:00
Weekend
1b6f80952e fixed:looplistitem重复赋值问题
fixed:looplistitem重复赋值问题
2023-11-12 19:49:02 +08:00
ALEXTANG
b52e655c30 更正错误注释
更正错误注释
2023-11-07 11:04:59 +08:00
ALEXTANG
8c0df95626 修正CancellationTokenSource重复Dispose问题
修正CancellationTokenSource重复Dispose问题
2023-11-03 16:58:42 +08:00
ALEXTANG
0d1e308f1c Update ResourceModule.cs 2023-11-03 10:07:25 +08:00
ALEXTANG
f8797538fd Update UIBase.cs 2023-11-03 09:55:36 +08:00
ALEXTANG
fe4e168041 Update ProcedurePreload.cs 2023-11-02 15:35:01 +08:00
ALEXTANG
8e9047d3a3 基于资源框架实现对标签WEBGL_PRELOAD、PRELOAD的预加载。 接口GameModule.Resource.GetPreLoadAsset<T>(location)
基于资源框架实现对标签WEBGL_PRELOAD、PRELOAD的预加载。 接口GameModule.Resource.GetPreLoadAsset<T>(location)
2023-11-02 13:16:05 +08:00
ALEXTANG
04bfaeccc8 示例CLI工作流
示例CLI工作流
2023-11-02 12:55:27 +08:00
ALEXTANG
d66c823c15 更新优化启用UpdateData时UILoadUpdate时序的问题
更新优化启用UpdateData时UILoadUpdate时序的问题
2023-11-02 11:48:47 +08:00
ALEXTANG
0ec1424f0a 升级HybridCLR 4.0.11=>4.0.12
升级HybridCLR 4.0.11=>4.0.12
2023-11-02 11:12:56 +08:00
ALEXTANG
01f8eb9d57 升级HybridCLR 4.0.10=>4.0.11 强烈建议升级,修复了若干bug
升级HybridCLR 4.0.10=>4.0.11 强烈建议升级,修复了若干bug
2023-11-02 10:01:30 +08:00
ALEXTANG
f5021a9688 修正Utility生命周期注入OnDestroy和OnDrawGizmos无效的问题
修正Utility生命周期注入OnDestroy和OnDrawGizmos无效的问题
2023-10-31 12:45:40 +08:00
ALEXTANG
a632f7a5ad Merge pull request #55 from AlanWeekend/main
修复demo流程的下载网速显示错误问题
2023-10-30 23:48:17 +08:00
Weekend
5f968f4154 优化网速计算
优化网速计算
2023-10-30 23:47:07 +08:00
Weekend
c9fe83c2bd Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-10-30 23:04:05 +08:00
Weekend
2c00d103cb Update ProcedureDownloadFile.cs
fixed:demo流程的下载网速错误显示问题
2023-10-30 23:04:01 +08:00
ALEXTANG
1d56437d9f Update Utility.Http.cs 2023-10-30 11:15:52 +08:00
ALEXTANG
69db1ff977 修正音频模块音频代理类赋值问题
#54 修正音频模块音频代理类赋值问题
2023-10-30 10:40:22 +08:00
ALEXTANG
48887b1aee 框架支持Shudown不关闭游戏重启
框架支持Shudown不关闭游戏重启
2023-10-27 13:18:12 +08:00
ALEXTANG
381ea8bb8d 增加支持ComponentAutoBindTool自动绑定UI元素组件。
增加支持ComponentAutoBindTool自动绑定UI元素组件。
2023-10-27 10:48:21 +08:00
ALEXTANG
7401edac15 移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备
移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备
2023-10-27 00:13:04 +08:00
ALEXTANG
b1c7f30be9 ErrorLogger屏幕显示开启与DebugModule关联。
ErrorLogger屏幕显示开启与DebugModule关联。
2023-10-26 23:45:26 +08:00
ALEXTANG
cfaf82a623 释放资源判断资源是否有效
释放资源判断资源是否有效
2023-10-26 14:07:38 +08:00
ALEXTANG
6992d12c6c 修复循环列表主动GetItemByIndex和GetItemList的问题
修复循环列表主动GetItemByIndex和GetItemList的问题
2023-10-26 13:12:35 +08:00
ALEXTANG
119d9683ad Merge pull request #53 from AlanWeekend/main
修复UIListBase和UILoopListWidget赋值问题
2023-10-26 12:49:00 +08:00
ALEXTANG
9478868513 修正HttpDispose
修正HttpDispose
2023-10-26 12:28:06 +08:00
ALEXTANG
6ed32082e1 修正HttpDispose
修正HttpDispose
2023-10-26 11:43:32 +08:00
ALEXTANG
6ee515e8c5 增加局部单位事件分发器的封装。
增加局部单位事件分发器的封装。
2023-10-26 10:28:05 +08:00
ALEXTANG
b839afa76a 释放资源判断资源是否有效、支持YooAssets日志重定向
释放资源判断资源是否有效、支持YooAssets日志重定向
2023-10-26 00:22:02 +08:00
Weekend
d9605b348a 修复UILoopListWidget赋值问题 2023-10-25 22:34:02 +08:00
Weekend
dfef83919c 修复UIListBase和UIUILoopListWidget赋值问题 2023-10-25 22:18:57 +08:00
ALEXTANG
f5f983f220 移除资源模块加载场景,加载场景统一走场景管理模块。增加场景加载进度回调。
移除资源模块加载场景,加载场景统一走场景管理模块。增加场景加载进度回调。
2023-10-23 17:01:06 +08:00
ALEXTANG
d61b1206ee 通过CommandLineReader可以不前台开启Unity实现静默打包,详见CommandLineReader.cs example1
通过CommandLineReader可以不前台开启Unity实现静默打包,详见CommandLineReader.cs example1
2023-10-23 15:22:34 +08:00
ALEXTANG
3650ba1a8b 更新转表bat自动拷贝ConfigSystem
更新转表bat自动拷贝ConfigSystem
2023-10-23 13:00:40 +08:00
ALEXTANG
8f14a4d2cb 日志重定向相关的实用函数。
日志重定向相关的实用函数。
2023-10-23 11:41:44 +08:00
ALEXTANG
dc22e595c9 拓展支持AssetInspector,支持更多文件类型在Inspector显示
拓展支持AssetInspector,支持更多文件类型在Inspector显示
2023-10-23 11:41:33 +08:00
ALEXTANG
0e70f7d446 日志重定向相关的实用函数。
日志重定向相关的实用函数。
2023-10-23 11:27:06 +08:00
ALEXTANG
039569b2d4 提交配置表加载模板
提交配置表加载模板
2023-10-23 10:15:11 +08:00
ALEXTANG
ea38004ba2 luban-next支持懒加载 感谢半仙儿提供支持
luban-next支持懒加载 感谢半仙儿提供支持
2023-10-20 16:24:00 +08:00
ALEXTANG
cc97c0583a 升级luban-next
升级luban-next
2023-10-20 11:53:29 +08:00
ALEXTANG
887094a4b1 升级luban-next
升级luban-next
2023-10-20 11:38:51 +08:00
ALEXTANG
0d09a7e73b 增加场景管理模块。
增加场景管理模块。
2023-10-18 16:42:44 +08:00
ALEXTANG
d8f8514f9d WebGL下不对YooAssets.Destroy();
WebGL下不对YooAssets.Destroy();
2023-10-18 11:23:20 +08:00
ALEXTANG
f2f6b2422f 资源模块优化、UI模块优化,增加接口参数是否使用缓存资源操作句柄。
资源模块优化、UI模块优化,增加接口参数是否使用缓存资源操作句柄、如果需要则不会淘汰缓存队列中的资源清单。
2023-10-18 10:30:12 +08:00
ALEXTANG
3a9cad9397 Update ResourceManager.cs 2023-10-16 16:38:13 +08:00
ALEXTANG
5e70e7972e 更新资源模块接口
更新资源模块接口
2023-10-16 13:03:41 +08:00
ALEXTANG
8d2b4200d6 升级HybridCLR 4.0.8=>4.0.10
升级HybridCLR 4.0.8=>4.0.10
2023-10-13 16:09:34 +08:00
ALEXTANG
b983e85416 资源模块优化-使用资源缓存表以及资源淘汰算法,缓存常用资源,利于获取、淘汰不常用资源。
资源模块优化-使用资源缓存表以及资源淘汰算法,缓存常用资源,利于获取、淘汰不常用资源。
2023-10-13 15:53:16 +08:00
ALEXTANG
99d2afdbd7 事件模块通用命名。
事件模块通用命名。
2023-10-10 21:00:21 +08:00
ALEXTANG
57ce836b3c 升级HybridCLR 4.0.7=>4.0.8
升级HybridCLR 4.0.7=>4.0.8
2023-10-10 20:21:33 +08:00
ALEXTANG
8dce78d6fb 事件模块拓展参数支持。
事件模块拓展参数支持。
2023-10-10 18:13:51 +08:00
ALEXTANG
6d41adffd9 音频模块初始化可自定义音频混响器.
音频模块初始化可自定义音频混响器.
2023-10-10 18:09:35 +08:00
ALEXTANG
cb9129261b 增加通过Tag加载资源对象集合的接口。
增加通过Tag加载资源对象集合的接口。
2023-10-09 19:37:00 +08:00
ALEXTANG
89dd6214d4 修复首次图集导入bug
修复首次图集导入bug
2023-10-09 19:37:00 +08:00
ALEXTANG
1aec76d64c 更新packages
1.升级HybridCLR 4.0.6=>4.0.7
2.使用Unity新版MemoryProfiler
2023-10-09 19:37:00 +08:00
ALEXTANG
859f654f6d 关闭垂直同步,避免设置帧率失效
关闭垂直同步,避免设置帧率失效
2023-10-09 19:37:00 +08:00
ALEXTANG
391d690f9d Merge pull request #49 from ALEXTANGXIAO/TEngine_v4.0.0
TEngine v4.0.0
2023-10-08 16:02:59 +08:00
ALEXTANG
bb0b4104f9 Create about.txt 2023-10-08 15:49:30 +08:00
ALEXTANG
20d0ecd8da Init TEngine4.0.0
Init TEngine4.0.0
2023-10-08 15:47:33 +08:00
ALEXTANG
8c3d6308b9 Init TEngine4.0.0
Init TEngine4.0.0
2023-10-08 15:21:33 +08:00
ALEXTANGXIAO
4c8c37ffd8 异步加载原生文件接口问题修正。
异步加载原生文件接口问题修正。
2023-10-04 18:58:45 +08:00
ALEXTANG
5f694c2bed WebGL毛玻璃效果使用默认
WebGL毛玻璃效果使用默认
2023-09-18 16:41:08 +08:00
ALEXTANG
7ff74bb747 Update GameTime.cs 2023-09-18 16:40:51 +08:00
ALEXTANG
a5de63397a Update 3-4-对象池模块.md 2023-09-18 12:00:36 +08:00
ALEXTANG
13cc62f3f1 增加打印输出协议
增加打印输出协议
2023-09-15 14:07:26 +08:00
ALEXTANGXIAO
95dfac5294 支持普通协议对象数据结构不加入opcode
支持普通协议对象数据结构不加入opcode
2023-09-06 00:13:14 +08:00
ALEXTANGXIAO
14e95107c9 服务器ByteBuf消除警告
服务器ByteBuf消除警告
2023-09-05 23:57:12 +08:00
ALEXTANGXIAO
caf5b2b54e 导出网络协议增加了缓存文件保证一致性
导出网络协议增加了缓存文件保证一致性
2023-09-05 23:56:50 +08:00
ALEXTANG
285483034e Update Exporter.cs 2023-09-05 21:08:54 +08:00
ALEXTANG
1cdd8b63b4 同步服务器导出SceneType
同步服务器导出SceneType
2023-09-05 21:07:33 +08:00
ALEXTANG
4c748df7ac Update ProcedureInitPackage.cs 2023-09-05 20:53:56 +08:00
ALEXTANG
e1229b5a4b 移除无用Extension
移除无用Extension
2023-09-05 20:28:37 +08:00
ALEXTANG
b937fb1a37 [-] 移除Luban无用转表bat
[-] 移除Luban无用转表bat
2023-09-05 19:08:02 +08:00
ALEXTANG
87ab99b363 修复了KCPClientNetwork断开网络连接会发生异常的问题
修复了KCPClientNetwork断开网络连接会发生异常的问题
2023-09-05 14:39:53 +08:00
ALEXTANG
e3a47393f4 [+] 新增游戏物体缓存池ResourcePool
[+] 新增游戏物体缓存池ResourcePool
2023-09-05 14:35:19 +08:00
ALEXTANG
75725314ad FIxed 网络模块对象池复使用问题
FIxed 网络模块对象池复使用问题
2023-09-04 10:06:20 +08:00
ALEXTANG
d3ed2b21b9 Update AudioModule.cs 2023-08-28 20:53:40 +08:00
ALEXTANG
ec34dfbb16 Delete protobuf-net.csproj.meta 2023-08-28 20:41:10 +08:00
ALEXTANG
bd76e3a651 移除示例配置资源.
移除示例配置资源.
2023-08-28 20:35:30 +08:00
ALEXTANG
278c8f23be Update DefaultSettingSerializer.cs 2023-08-28 20:24:31 +08:00
ALEXTANG
42568db2ab Add System.Runtime.CompilerServices.Unsafe.dll
Add System.Runtime.CompilerServices.Unsafe.dll
2023-08-28 20:13:06 +08:00
ALEXTANG
b033c59b00 Aot程序集不查找热更域的Type
Aot程序集不查找热更域的Type
2023-08-28 15:08:18 +08:00
ALEXTANG
04a43a3f11 1.增加重启流程Procedure接口。2.增加进入热更域后的流程Procedure。
1.增加重启流程Procedure接口。2.增加进入热更域后的流程Procedure。
2023-08-26 11:08:46 +08:00
ALEXTANG
54214cdd0b 程序集AssemblyDefine增加对UniTask textmeshpro和dotween的拓展
程序集AssemblyDefine增加对UniTask textmeshpro和dotween的拓展
2023-08-25 14:50:20 +08:00
ALEXTANG
fa870b6228 DotNet支持自定义协议目录
DotNet支持自定义协议目录
2023-08-24 18:38:05 +08:00
ALEXTANG
8a49d3437b Delete proto_csOuterMessage.proto 2023-08-24 17:47:42 +08:00
ALEXTANG
f19b889deb DotNet支持自定义协议目录
DotNet支持自定义协议目录
2023-08-24 17:47:21 +08:00
ALEXTANG
d55f6e29d9 Update RootModule.cs 2023-08-22 11:27:58 +08:00
ALEXTANG
8e4af31f26 修改默认UI资源组的PackRule为PackSeparately
修改默认UI资源组的PackRule为PackSeparately
2023-08-21 20:21:59 +08:00
ALEXTANG
58a4b3e043 YooAsset增加补丁包导入工具和补丁包对比工具
YooAsset增加补丁包导入工具和补丁包对比工具
2023-08-21 20:21:03 +08:00
ALEXTANG
576bf3bb48 增加可选的JsonHelper - NewtonsoftJsonHelper
增加可选的JsonHelper - NewtonsoftJsonHelper
2023-08-21 20:20:28 +08:00
ALEXTANG
d282b81546 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-19 16:23:19 +08:00
ALEXTANG
d6dcd8851c 更新文档
更新文档
2023-08-18 17:49:28 +08:00
ALEXTANG
bbea9c4cee Update UIExtension.cs 2023-08-18 17:10:41 +08:00
ALEXTANG
b1ccb1fd53 Update Utility.Http.cs 2023-08-18 16:54:17 +08:00
ALEXTANG
0f2ad3c71d [+] UI循环列表拓展Grid 用法和List一样
[+] UI循环列表拓展Grid 用法和List一样
2023-08-18 16:32:08 +08:00
ALEXTANG
0e6851e691 Remove unused ogg
Remove unused ogg
2023-08-18 15:24:33 +08:00
ALEXTANG
75b9956261 流程初始音效设置开启 2023-08-18 14:33:49 +08:00
ALEXTANG
401c397fc8 流程初始音效设置开启
流程初始音效设置开启
2023-08-18 14:25:10 +08:00
ALEXTANG
94b314e91f TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
2023-08-18 13:06:08 +08:00
ALEXTANG
a6573d9336 Update ConfigLoader.cs 2023-08-18 13:05:02 +08:00
ALEXTANG
abf5357f49 给不支持WEBGL的增加宏定义
给不支持WEBGL的增加宏定义
2023-08-18 13:04:53 +08:00
ALEXTANG
aab353cca3 Remove Unused Codes.
Remove Unused Codes.
2023-08-17 23:11:11 +08:00
ALEXTANG
e13071c4db 移除调试luban残留的日志
移除调试luban残留的日志
2023-08-17 23:10:14 +08:00
ALEXTANG
e071c20214 拓展自定义鲁班加载配置,支持懒加载 默认使用懒加载,未使用的配置不会载入内存
拓展自定义鲁班加载配置,支持懒加载 默认使用懒加载,未使用的配置不会载入内存
2023-08-17 23:07:07 +08:00
ALEXTANG
bf73ce333b 拓展自定义鲁班加载配置,支持UniTask异步 默认使用同步加载
拓展自定义鲁班加载配置,支持UniTask异步 默认使用同步加载
2023-08-17 22:00:55 +08:00
ALEXTANG
d7a60002d4 ErrorLog使用异步显示UI
ErrorLog使用异步显示UI
2023-08-17 21:41:30 +08:00
ALEXTANG
61f657322d 增加WebGLUpdateDataUrl
增加WebGLUpdateDataUrl
2023-08-17 21:41:07 +08:00
ALEXTANG
33223dc02e 处理DotNet网络层对WebGL导出的兼容 2023-08-17 21:38:21 +08:00
ALEXTANG
0661c59877 处理DotNet网络层对WebGL导出的兼容
处理DotNet网络层对WebGL导出的兼容
2023-08-17 14:06:09 +08:00
ALEXTANG
7c74e10857 提供单独销毁UIWidget的接口。增加UIWidget异步创建接口。
提供单独销毁UIWidget的接口。增加UIWidget异步创建接口。
2023-08-17 10:59:37 +08:00
ALEXTANG
db935bfb5f DotNet 加入热更域,修正GameProto的依赖
DotNet 加入热更域,修正GameProto的依赖
2023-08-16 15:31:16 +08:00
ALEXTANG
dc6b7bb21e 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-15 17:24:02 +08:00
ALEXTANG
d32f3cb768 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-15 17:22:05 +08:00
ALEXTANG
a32ab30444 修改luban模板配置,支持异步加载配置实例,客户端使用UniTask异步加载配置,避免WebGL不支持原生Task
修改luban模板配置,支持异步加载配置实例,客户端使用UniTask异步加载配置,避免WebGL不支持原生Task
2023-08-15 12:54:15 +08:00
ALEXTANG
aa0d40c758 修改luban模板配置,支持异步加载配置实例
修改luban模板配置,支持异步加载配置实例
2023-08-15 12:07:21 +08:00
ALEXTANGXIAO
5239b89326 DotNet 加入热更域
DotNet 加入热更域
2023-08-12 23:39:21 +08:00
ALEXTANG
53f0ecb6c1 [+] UI循环列表拓展与示例
[+] UI循环列表拓展与示例
2023-08-10 23:25:43 +08:00
ALEXTANG
ea9447d0ea Update ClientGm.cs 2023-08-10 10:10:50 +08:00
ALEXTANG
0c6d59f53e Fixed BehaviourSingleton #45
Fixed BehaviourSingleton #45
2023-08-10 10:09:59 +08:00
ALEXTANG
9986e22d18 [-] Remove Old ProtoGenerate
[-] Remove Old Proto Generate
2023-08-09 14:22:39 +08:00
ALEXTANG
7deb049769 更新Entity接口 泛型获取父级、Define增加unit[]类型
更新Entity接口 泛型获取父级、Define增加unit[]类型
2023-08-09 11:09:38 +08:00
ALEXTANG
fce8bd4d60 Update DebuggerModule.SettingsWindow.cs 2023-08-08 19:54:37 +08:00
ALEXTANG
7ec14c670f Luban配置表拓展分组-分组为c和client的为仅客户端字段s和server为仅服务器字段
Luban配置表拓展分组-分组为c和client的为仅客户端字段s和server为仅服务器字段
2023-08-07 15:14:43 +08:00
ALEXTANGXIAO
efe3d2b25b Update README
Update README
2023-08-06 00:36:29 +08:00
ALEXTANGXIAO
2107282368 Update Readme
Update Readme
2023-08-05 00:54:25 +08:00
ALEXTANG
fb26ea2297 Update AddressableManageComponent.cs 2023-08-04 01:42:26 +08:00
ALEXTANG
9ac150425f Update IntDictionaryConfig.cs 2023-08-04 01:42:00 +08:00
ALEXTANG
36d2c146b0 1、修复了MongoDB在2.18.0以后需要自定义注册ObjectSerializer的问题。 2、Addressable的AddAddressable接口增加isLock参数、用来决定是否需要添加携程锁。 3、修复了APackInfo因为网络多线程的原因导致线程安全的问题。
1、修复了MongoDB在2.18.0以后需要自定义注册ObjectSerializer的问题。
2、Addressable的AddAddressable接口增加isLock参数、用来决定是否需要添加携程锁。
3、修复了APackInfo因为网络多线程的原因导致线程安全的问题。
2023-08-04 01:41:31 +08:00
ALEXTANG
774b73bbbf 注释防裁剪脚本中相机权限的引用
注释防裁剪脚本中相机权限的引用
2023-08-01 16:57:43 +08:00
ALEXTANG
32366eb127 移除防裁剪脚本中相机权限的引用
移除防裁剪脚本中相机权限的引用
2023-08-01 16:54:49 +08:00
ALEXTANG
a843617e5f Update README.md 2023-08-01 10:44:15 +08:00
ALEXTANGXIAO
46b139f7cf 补充IOS运行快照到Books下
补充IOS运行快照到Books下
2023-08-01 00:06:07 +08:00
ALEXTANG
e6ff1dec3f Update BuglyAgent.cs 2023-07-31 20:36:44 +08:00
ALEXTANG
4429732010 Update ConfigLoader.cs 2023-07-31 15:01:11 +08:00
ALEXTANGXIAO
60a5caebae 1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
2023-07-29 01:03:35 +08:00
ALEXTANGXIAO
f7c95d8216 服务器启动防呆提示需要转表
服务器启动防呆提示需要转表
2023-07-29 00:12:52 +08:00
ALEXTANGXIAO
98dcb80942 更新编辑器MenuItem导表与导出协议
更新编辑器MenuItem导表与导出协议
2023-07-29 00:03:54 +08:00
ALEXTANG
30192d52cf 调整网络demo场景路径
调整网络demo场景路径
2023-07-27 10:18:02 +08:00
ALEXTANGXIAO
b7b2262d53 合理化服务器命名,使开发者更容易理解。
Scene的routeId更名为locationId
2023-07-27 00:33:39 +08:00
ALEXTANG
d1c93f15d6 Application.OpenURL 调用bat的cmd运行时问题
Application.OpenURL 调用bat的cmd运行时问题
2023-07-26 15:39:20 +08:00
ALEXTANGXIAO
1ac1ff7d56 [+] Update HybridCLR v3.4.0
[+] Update HybridCLR v3.4.0
2023-07-26 00:07:47 +08:00
ALEXTANG
863788f303 Update UIWidget.cs 2023-07-25 23:37:02 +08:00
ALEXTANG
74790c7486 Update UIWindow.cs 2023-07-25 23:34:42 +08:00
ALEXTANG
1c223c8ad0 [+] DOTweenExtension
[+] DOTweenExtension
2023-07-25 17:08:57 +08:00
ALEXTANG
e75b3a4e66 [+] UniTask External YooAsset、Dotween、TextMeshPro 2023-07-25 16:28:09 +08:00
ALEXTANG
91b0995911 [+] UniTask External YooAsset、Dotween、TextMeshPro
[+] UniTask External YooAsset、Dotween、TextMeshPro
2023-07-25 16:22:13 +08:00
ALEXTANG
14c886ea8f [+] UniTask External YooAsset、Dotween、TextMeshPro
[+] UniTask External YooAsset、Dotween、TextMeshPro
2023-07-25 16:20:26 +08:00
ALEXTANG
9babc0ba85 [+] 合理化目录结构 精简非必要插件如确定性物理库以及Recast插件。
[+] 合理化目录结构 精简非必要插件如确定性物理库以及Recast插件。
2023-07-25 14:34:05 +08:00
ALEXTANG
f8056aef32 调整服务器逻辑
1、调整Entity.AddComponent方法添加的组件Id为父组件的Id。
2、增加了ISupportedSingleCollection和ISingleCollectionRoot接口.
3、增加了SingleCollection、用于把子组件保存到单独的数据库表的功能,配合ISupportedSingleCollection和ISingleCollectionRoot。
2023-07-24 16:49:23 +08:00
ALEXTANG
846dc4d4bc Fixed the session dispose
Fixed the session dispose
2023-07-24 13:17:59 +08:00
ALEXTANG
03ab7fb353 Create start_export.bat 2023-07-23 22:18:47 +08:00
ALEXTANG
3c11980e7c Create start_develop.bat 2023-07-23 22:18:45 +08:00
ALEXTANG
c23aa0bd71 Revert "Update Core.csproj"
This reverts commit df76d0b77a.
2023-07-23 21:32:22 +08:00
ALEXTANG
df76d0b77a Update Core.csproj 2023-07-23 21:32:01 +08:00
ALEXTANG
35d2012546 1.替换了KCP为C#版本 2.KCP增加了Memery<T>支持。 3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升 4.优化了消息调度执行逻辑
1.替换了KCP为C#版本
2.KCP增加了Memery<T>支持。
3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升
4.优化了消息调度执行逻辑
2023-07-23 00:25:47 +08:00
ALEXTANG
c96d20a89a [+] GameFrameworkModuleSystem
[+] GameFrameworkModuleSystem
2023-07-22 17:53:00 +08:00
ALEXTANG
5787d0f9dc [+] GameModuleSystem
[+] GameModuleSystem
2023-07-22 17:51:24 +08:00
ALEXTANG
8b35c8ca07 Update ProjectSettings.asset 2023-07-22 17:50:06 +08:00
ALEXTANG
e5456da482 合理化Address协议逻辑
合理化Address协议逻辑
2023-07-21 17:50:47 +08:00
ALEXTANG
144ba9f222 完善AddressableManageComponent与ClientNetworkComponent
完善AddressableManageComponent与ClientNetworkComponent
2023-07-21 14:32:20 +08:00
ALEXTANG
889fbdc8e1 Update UIGaussianBlurLayer.cs 2023-07-19 17:34:02 +08:00
ALEXTANG
0d177e6868 Update AssetGroup.cs 2023-07-19 17:33:56 +08:00
ALEXTANG
29135228be Update AssetReference.cs 2023-07-19 17:33:52 +08:00
ALEXTANG
c1a1de73cd Update ResourceManager.cs 2023-07-19 17:33:48 +08:00
ALEXTANG
612e9b7eba Update ResourceModule.cs 2023-07-19 17:33:44 +08:00
ALEXTANG
5ed6b8c378 Update UIModule.cs 2023-07-19 17:33:41 +08:00
ALEXTANG
06dad5a68a Update UIWidget.cs 2023-07-19 17:33:28 +08:00
ALEXTANG
9e0462043c Update WindowAttribute.cs 2023-07-19 17:33:25 +08:00
ALEXTANG
c1178e284b Update DUnityUtil.cs 2023-07-19 17:33:21 +08:00
ALEXTANG
8e3dd138a6 Merge pull request #44 from ALEXTANGXIAO/3.0.0-network
TEngine-3.0.0 NetWork And Server
2023-07-19 16:32:03 +08:00
ALEXTANG
405253c507 Update BuildAssetsCommand.cs 2023-07-19 16:03:02 +08:00
ALEXTANG
66ef50a9e0 WebGL适配 2023-07-19 15:51:16 +08:00
ALEXTANG
413f4dcda7 Update GameClient.cs 2023-07-19 15:23:46 +08:00
ALEXTANG
75fdb4d7de Update GameClient.cs 2023-07-19 15:20:05 +08:00
ALEXTANG
1ada1e4e33 Update H_C2G_LoginAddressRequestHandler.cs 2023-07-19 15:20:01 +08:00
ALEXTANG
3848b6aaaa Create AddressableSceneHelper.cs 2023-07-19 15:19:57 +08:00
ALEXTANG
2b33b405c0 Update SceneConfig.cs 2023-07-19 15:19:44 +08:00
ALEXTANG
6766b930d7 更新机器内网配置
更新机器内网配置
2023-07-19 13:08:03 +08:00
ALEXTANG
526baf45fa 完善网络框架,增加服务器断开连接回调 2023-07-18 17:36:48 +08:00
ALEXTANG
a473971cfb Update H_C2G_LoginAddressRequestHandler.cs 2023-07-18 13:06:00 +08:00
ALEXTANG
51effd2c97 Update TCPClientNetwork.cs 2023-07-18 13:05:57 +08:00
ALEXTANG
4205220b64 Network Example2
Network Example2
2023-07-18 13:05:48 +08:00
ALEXTANG
e95c18ca67 Update README.md
Update README.md
2023-07-18 10:08:46 +08:00
ALEXTANG
f5571716a2 Update SkillDisplayData.cs 2023-07-17 20:59:13 +08:00
ALEXTANG
d61a8dfa4b GMPanel
GMPanel
2023-07-17 20:59:04 +08:00
ALEXTANG
068ec709d0 [+] Add GamePlayScene
[+] Add GamePlayScene
2023-07-17 19:00:24 +08:00
ALEXTANG
8b26b790ee GameServerScene
GameServerScene
2023-07-17 18:38:50 +08:00
ALEXTANG
da35b4306b EnumHelper
EnumHelper
2023-07-17 18:29:41 +08:00
ALEXTANG
ee2147e3d9 Update BattleDemo
Update BattleDemo
2023-07-17 18:09:07 +08:00
ALEXTANG
a273e9d5f8 Entitas
Entitas
2023-07-17 15:28:27 +08:00
ALEXTANG
31d4d6c0b8 Update
Update
2023-07-17 01:05:12 +08:00
ALEXTANG
6a6f0591f1 完善Entity状态
完善Entity状态
2023-07-17 01:00:33 +08:00
ALEXTANG
9cd0bac81e 完善登录注册Demo
完善登录注册Demo
2023-07-17 01:00:10 +08:00
ALEXTANG
4abe10eecf IDataBase Last
IDataBase Last
2023-07-16 19:06:45 +08:00
ALEXTANG
bd10297dfa [+] HybridCLR=》v3.3.0
[+] HybridCLR=》v3.3.0
2023-07-16 15:51:44 +08:00
ALEXTANG
7ce72b8aa8 合理化框架
合理化框架
2023-07-16 15:37:38 +08:00
ALEXTANG
c6ecb48944 注册登录Demo
注册登录Demo
2023-07-16 00:57:20 +08:00
ALEXTANG
c178f8bb75 配置目录同步程序集调整
配置目录同步程序集调整
2023-07-15 18:45:38 +08:00
ALEXTANG
d4f160d284 合理化程序集,服务器Logic无需共享的代码存放解决方案目录,无需走Unity目录
合理化程序集,服务器Logic无需共享的代码存放解决方案目录,无需走Unity目录
2023-07-15 18:39:42 +08:00
ALEXTANG
d87653a9fb 调整对于Linux打包的支持
调整对于Linux打包的支持
2023-07-15 00:58:40 +08:00
ALEXTANG
04a5a0e048 Update Demo
Update Demo
2023-07-14 14:23:51 +08:00
ALEXTANG
c825f4d920 Streamline Unity Engineering
Streamline Unity Engineering
2023-07-14 13:38:05 +08:00
ALEXTANG
b3e59b92d6 Update ThirdParty.csproj 2023-07-14 12:47:52 +08:00
ALEXTANG
37af620d71 Update RootNameSpace
Update RootNameSpace
2023-07-14 12:45:06 +08:00
ALEXTANG
493172a925 Update
Update
2023-07-13 23:54:38 +08:00
ALEXTANG
1382db8c61 Update
Update
2023-07-13 21:13:29 +08:00
ALEXTANG
72b7149aa1 Update
Update
2023-07-13 21:02:29 +08:00
ALEXTANG
0c51ae7bdd Update
Update
2023-07-13 19:40:12 +08:00
ALEXTANG
79dc302f14 Update Utility.Http.cs 2023-07-13 19:34:30 +08:00
ALEXTANG
95e4dd93a8 Update
Update
2023-07-13 19:05:40 +08:00
ALEXTANG
2b310c00f2 Update ThirdParty.csproj 2023-07-13 18:22:01 +08:00
ALEXTANG
fbb26ea9ea Update
Update
2023-07-13 18:20:39 +08:00
ALEXTANG
bff8f20af3 Refresh Plugins 2023-07-13 17:41:23 +08:00
ALEXTANG
0c7ce5f28c Refresh Plugins 2023-07-13 17:37:44 +08:00
ALEXTANG
31fc9abdf9 Update OdinModuleConfig.asset 2023-07-13 17:36:37 +08:00
ALEXTANG
a087f40e8a [-] Remove Cysharp.MemoryPack
[-] Remove Cysharp.MemoryPack
2023-07-13 17:31:53 +08:00
ALEXTANG
7b2fc7ce9f Update DotNet sln
Update DotNet sln
2023-07-13 17:27:57 +08:00
ALEXTANG
dc4bb8cc9c Unity低版本语法兼容
Unity低版本语法兼容
2023-07-13 17:24:37 +08:00
ALEXTANG
0c8f3a5f92 [+] TEngineServer
[+] TEngineServer
2023-07-13 17:17:26 +08:00
ALEXTANG
a69f53592e 移除 重构
移除 重构
2023-07-13 12:46:26 +08:00
ALEXTANG
8757e1f550 [+] add et8 csproject
[+] add et8 csproject
2023-07-13 12:26:12 +08:00
ALEXTANG
336d4b2eb9 [+] 接入ET8服务端
[+] 接入ET8服务端
2023-07-13 12:23:48 +08:00
ALEXTANG
e0be062006 Remove old networkmodule 2023-07-12 17:36:29 +08:00
ALEXTANG
5e69129667 Remove old networkmodule
Remove old networkmodule
2023-07-12 17:35:05 +08:00
ALEXTANG
4c39ab79ca [+] Books 2023-07-12 17:28:08 +08:00
ALEXTANG
a710d1cb76 [+] Books 2023-07-10 13:59:56 +08:00
ALEXTANG
8472839394 [+] Books 2023-07-10 13:51:32 +08:00
ALEXTANG
4988c99d31 [+] Books
[+] Books
2023-07-10 12:51:13 +08:00
ALEXTANG
4fa62b2d79 Update README.md 2023-07-10 12:35:48 +08:00
ALEXTANG
f549514d7c Update ResourceManager.cs 2023-07-09 00:07:32 +08:00
ALEXTANG
f588038848 Update UIButtonScale.cs 2023-07-06 19:17:16 +08:00
ALEXTANG
9e0e3ebd50 Fixed the bug of CreateWidgetByPath
Fixed the bug of CreateWidgetByPath
2023-07-06 19:07:45 +08:00
ALEXTANG
b07ef836a9 Update ProcedureLoadAssembly.cs 2023-07-05 15:20:18 +08:00
ALEXTANG
7a1d593195 Update UnityExtension.cs 2023-07-05 15:20:12 +08:00
ALEXTANG
bc113c5c6e [+] Update版本更新时CDN地址也可更新
[+] Update版本更新时CDN地址也可更新
2023-07-04 20:57:26 +08:00
ALEXTANG
753bbdfb82 [+] HybridCLR IOS相机权限问题
大坑 没有任何异常、警告、日志 如果不写这个,就是没有响应
2023-06-29 11:25:33 +08:00
ALEXTANG
6a6d33c536 Update AudioAgent.cs 2023-06-25 17:51:17 +08:00
ALEXTANG
57a014a83a [+] Fixed UIWidget
[+] Fixed UIWidget
2023-06-25 15:26:40 +08:00
ALEXTANG
9d1a8e8c9d Create UIEventItem.cs.meta 2023-06-25 15:26:17 +08:00
ALEXTANG
86c26cd21b Create UIEventItem.cs 2023-06-25 15:26:13 +08:00
ALEXTANG
b60b9fff42 Update UIExtension.cs 2023-06-25 15:26:08 +08:00
ALEXTANG
990e17a6cc [+] HybridCLR 补充元数据设置
[+] HybridCLR 补充元数据设置
2023-06-25 15:21:46 +08:00
ALEXTANG
be531bfad0 Fixed the bug for AssetsGroup
Fixed the bug for AssetsGroup
2023-06-23 00:00:58 +08:00
ALEXTANG
6c46f3e5fd [+] Update HybridCLR v3.2.0
[+] Update HybridCLR v3.2.0
2023-06-19 17:17:13 +08:00
ALEXTANG
e4b48e3c58 Update README.md 2023-06-16 14:27:56 +08:00
ALEXTANG
68e5b1d482 Update README.md 2023-06-09 11:40:59 +08:00
ALEXTANG
abd152b072 [+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
[+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
2023-06-06 19:28:44 +08:00
ALEXTANG
470e62d9c4 Update ResourceModule.cs 2023-06-06 15:19:28 +08:00
ALEXTANG
481b5911ab Update ResourceManager.cs 2023-06-06 15:19:24 +08:00
ALEXTANG
05d3aff05e Update IResourceManager.cs 2023-06-06 15:19:20 +08:00
ALEXTANG
86bb6353dc Update ResourceManager.Services.cs
同步修复IOS平台流解密失败的问题。
2023-06-06 09:55:01 +08:00
ALEXTANG
334698b6e6 Update RootModule.cs 2023-06-05 19:31:32 +08:00
ALEXTANG
2684bd29f5 Update GameClient.cs 2023-06-05 14:49:26 +08:00
ALEXTANG
c568c62404 [+] Update HybridCLR v2.4.2
[+] Update HybridCLR v2.4.2
2023-06-05 12:34:27 +08:00
ALEXTANG
699ccb3b09 [+] Update YooAssets v1.4.14
[+] Update YooAssets v1.4.14
2023-06-05 12:19:24 +08:00
ALEXTANG
f92bf5c602 Update GameClient.cs 2023-05-20 12:23:45 +08:00
ALEXTANG
cd87c71281 Update MsgDispatcher.cs 2023-05-20 12:23:41 +08:00
ALEXTANG
94c137b3c6 Update ILogicSys.cs 2023-05-20 11:27:11 +08:00
ALEXTANG
120a86b396 Create Redux.cs 2023-05-20 11:25:49 +08:00
ALEXTANG
383dc50fe3 Create Redux.cs.meta 2023-05-20 11:25:46 +08:00
ALEXTANG
2369e8723c Update TSingleton.cs 2023-05-20 11:25:44 +08:00
ALEXTANG
344f3293ad Update ILogicSys.cs 2023-05-20 11:25:37 +08:00
ALEXTANG
5d361dd188 Update BehaviourSingleton.cs 2023-05-20 11:25:09 +08:00
ALEXTANG
a2f7fe907a Update BaseLogicSys.cs 2023-05-20 11:25:02 +08:00
ALEXTANG
5b3f64689f Create Attribute.cs.meta 2023-05-20 11:24:58 +08:00
ALEXTANG
2258c13892 Create Attribute.cs 2023-05-20 11:24:55 +08:00
ALEXTANG
a70d2e7d17 Update main.unity 2023-05-20 11:11:14 +08:00
ALEXTANG
b15f51631a Update Network.cs 2023-05-20 11:10:46 +08:00
ALEXTANG
da12bd7cab Update GameClient.cs 2023-05-20 11:10:41 +08:00
ALEXTANG
98bcaef6b7 Update UnitySingleton.cs 2023-05-20 11:10:39 +08:00
ALEXTANG
71d1286144 Update TSingleton.cs 2023-05-20 11:10:34 +08:00
ALEXTANG
9359a81a96 Update ProtobufUtility.cs 2023-05-20 11:01:38 +08:00
ALEXTANG
a9542646c1 Update NetworkChannelHelper.cs 2023-05-20 11:01:33 +08:00
ALEXTANG
0890ca9bdb [+] Network
[+] Network
2023-05-19 19:40:05 +08:00
ALEXTANG
ec409c7e15 Update Network
Update Network
2023-05-19 17:01:04 +08:00
ALEXTANG
4bc63fafc8 Update gen_pb_code.bat 2023-05-19 00:43:28 +08:00
ALEXTANG
fe0f9afd6d Update gen_pb_code.bat 2023-05-19 00:42:38 +08:00
ALEXTANG
4632a0c099 [+] UpdateNetwork Module
[+] UpdateNetwork Module
2023-05-19 00:31:15 +08:00
ALEXTANG
60e57bb80b Update ProtoUtil.cs 2023-05-19 00:08:23 +08:00
ALEXTANG
b7c79d0438 [+] ProtoCs
[+] ProtoCs
2023-05-19 00:08:11 +08:00
ALEXTANG
62b7c9e4d6 [+] Protobuf.dll
[+] Protobuf.dll
2023-05-19 00:07:24 +08:00
ALEXTANG
75a6977afb [+] ProtobufUtility
[+] ProtobufUtility
2023-05-19 00:06:43 +08:00
ALEXTANG
659da836ac Update GameLogic.asmdef 2023-05-19 00:05:52 +08:00
ALEXTANG
07c459051f [+] Proto
[+] Proto
2023-05-19 00:03:18 +08:00
ALEXTANG
4253a81e78 Update
Update
2023-05-19 00:02:43 +08:00
ALEXTANG
e498abacd1 Update ICSharpCode.SharpZipLib.dll.meta 2023-05-19 00:02:17 +08:00
ALEXTANG
f16759483f [+] NetProto
[+] NetProto
2023-05-17 23:07:17 +08:00
ALEXTANG
899472a5db [+] Network
[+] Network
2023-05-17 23:06:29 +08:00
ALEXTANG
e65245371a Update TEngineLogHelper.cs 2023-05-17 23:05:58 +08:00
ALEXTANG
b04fff4ec9 [+] proto 2023-05-17 21:38:44 +08:00
ALEXTANG
d8f8fd01d9 [+] proto 2023-05-17 21:38:24 +08:00
ALEXTANG
9b1c5e6f0a [+] proto
[+] proto
2023-05-17 21:38:14 +08:00
ALEXTANG
b2b5c9274c Update RuleConfig.asset 2023-05-15 14:09:38 +08:00
ALEXTANG
b814d689d8 [-] AnimationHierarchyEditorTool
[-] AnimationHierarchyEditorTool
2023-05-14 10:31:33 +08:00
ALEXTANG
ca6de42d67 Update main.unity 2023-05-13 14:56:47 +08:00
ALEXTANG
c3e9b76fd6 Update main.unity 2023-05-13 14:56:02 +08:00
ALEXTANG
dca7b71457 [+] DisStripCode 防裁剪
[+] DisStripCode 防裁剪
2023-05-13 14:55:55 +08:00
ALEXTANG
7106454dfb Update ProjectSettings.asset 2023-05-13 22:22:01 +08:00
ALEXTANG
b97e24aa6d Create BurstAotSettings_iOS.json 2023-05-13 22:21:49 +08:00
ALEXTANG
bec4cba501 Update .gitignore 2023-05-13 22:13:50 +08:00
ALEXTANG
0568d5f8b2 Update ProcedureLaunch.cs 2023-05-13 21:21:03 +08:00
ALEXTANG
49db48e7fc Update GameModule.cs 2023-05-13 21:20:42 +08:00
ALEXTANG
92fc5e0bcd Update ProcedureLaunch.cs 2023-05-13 21:12:41 +08:00
ALEXTANG
11391e597e Update AudioModule.cs 2023-05-13 21:12:36 +08:00
ALEXTANG
6b64f3b261 Update Constant.cs 2023-05-13 21:12:29 +08:00
ALEXTANG
dff6ba4e6d Update GameApp_RegisterSystem.cs 2023-05-13 20:35:36 +08:00
ALEXTANG
036c89a6d1 Update BehaviourSingleton.cs 2023-05-13 20:35:34 +08:00
595 changed files with 9054 additions and 178111 deletions

29
Books/0-介绍.md Normal file
View File

@@ -0,0 +1,29 @@
# 介绍- Introduce
### TEngine
<a style="text-decoration:none">
<img src="https://img.shields.io/badge/Unity%20Ver-2021.3.20++-blue.svg?style=flat-square" alt="status" />
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/github/license/ALEXTANGXIAO/TEngine" alt="license" />
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/github/last-commit/ALEXTANGXIAO/TEngine" alt="last" />
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/github/issues/ALEXTANGXIAO/TEngine" alt="issue" />
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/github/languages/top/ALEXTANGXIAO/TEngine" alt="topLanguage" />
</a>
TEngine是一套用于Unity框架解决方案用于帮助研发团队快速进行开发。
### 开箱即用
开箱即用、用法简洁,即用即上手.高可读性和详细的文档说明帮助你更快更好的进行游戏开发。您不需要关心框架的底层分离独自实现您的GamePlay。
### 性能强大
TEngine 底层使用基于UniTask的异步以及事件分发可插件定制化把复杂游戏简单化切以高性能、低耦合度实现。
### 高内聚低耦合
内嵌了The Best 次时代热更新解决方案<a href="https://github.com/focus-creative-games/hybridclr"><strong>HybridCLR</strong></a>、百万DAU验证的资源解决方案<a href="https://github.com/tuyoogame/YooAsset"><strong>YooAsset</strong></a>、你的游戏最佳配置解决方案<a href="https://github.com/focus-creative-games/luban"><strong>Luban</strong></a>

63
Books/1-快速开始.md Normal file
View File

@@ -0,0 +1,63 @@
# 快速开始- 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 // 热更主入口注册系统
```

82
Books/2-框架概览.md Normal file
View File

@@ -0,0 +1,82 @@
# TEngine
## TEngine-Runtime
### AOT内核基于Gameframework,优化、最简化以及商业化适配。
![image](src/2-1.png)
## AOT游戏框架模块基类。
#### 框架思路为面向接口编程如Resource资源模块开发白皮书为先定义IResourceManager的接口规范然后编写ResourceManager继承框架具体实现(ModuleImp)以及实现接口。最后实现调用层Module调用层可以拓展编辑器供开发者自定义模块参数。
``` csharp
/// <summary>
/// 游戏框架模块抽象类。ModuleImp为具体框架模块实现。
/// </summary>
internal abstract class ModuleImp
{
/// <summary>
/// 获取游戏框架模块优先级。
/// </summary>
/// <remarks>优先级较高的模块会优先轮询,并且关闭操作会后进行。</remarks>
internal virtual int Priority => 0;
/// <summary>
/// 游戏框架模块轮询。
/// </summary>
/// <param name="elapseSeconds">逻辑流逝时间,以秒为单位。</param>
/// <param name="realElapseSeconds">真实流逝时间,以秒为单位。</param>
internal abstract void Update(float elapseSeconds, float realElapseSeconds);
/// <summary>
/// 关闭并清理游戏框架模块。
/// </summary>
internal abstract void Shutdown();
}
//=====================================================================//
/// <summary>
/// 游戏框架模块抽象类。Module 为Mono调用层。
/// </summary>
public abstract class Module : MonoBehaviour
{
/// <summary>
/// 游戏框架模块初始化。
/// </summary>
protected virtual void Awake()
{
ModuleSystem.RegisterModule(this);
}
}
```
## 热更域程序集设计与说明
```
Assets/GameScripts
├── Main // 主程序程序集(启动器与流程)
└── HotFix // 游戏热更程序集目录 [Folder]
├── GameBase // 游戏基础框架程序集 [Dll]
├── GameProto // 游戏配置协议程序集 [Dll]
└── GameLogic // 游戏业务逻辑程序集 [Dll]
├── GameApp.cs 热更主入口
└── GameApp_RegisterSystem.cs 热更主入口注册系统
```
游戏内主要玩法逻辑包括UI会在GameLogic中编写GameBase则存放一些通用性的逻辑GameProto存放与服务区交互的协议以及配置表逻辑。若有项目需求完全可以进行自定义增删HotFix程序集。
PS注意增删程序集后需要同步到HybridClr的Setting面板以及TEngineSetting的面板。TEngineSettings面板有按钮可以从HybridClr中同步AOT与热更程序集。
## 常用模块接口
<strong>[3-1-资源模块](./3-1-资源模块.md)<strong>
<strong>[3-2-事件模块](./3-2-事件模块.md)<strong>
<strong>[3-3-内存池模块](./3-3-内存池模块.md)<strong>
<strong>[3-4-对象池模块](./3-4-对象池模块.md)<strong>
<strong>[3-5-UI模块](./3-5-UI模块.md)<strong>
<strong>[3-6-配置表模块](./3-6-配置表模块.md)<strong>
<strong>[3-7-流程模块](./3-7-流程模块.md)<strong>
<strong>[3-8-网络模块](./3-8-网络模块.md)<strong>

200
Books/3-1-资源模块.md Normal file
View File

@@ -0,0 +1,200 @@
## 3-1.资源模块 - ResourceModule
#### 资源模块默认使用Addressable可寻址定位。(!注意需要打包的资源不可以重名)
资源模块运行模式有EditorSimulateMode、OfflinePlayMode以及HostPlayMode
编辑器模式下以顶部导航栏的选项卡为优先选项打包后以Scene场景中ResourceModule脚本的Enum选项卡为优先选项(打包后不会走EditorSimulateMode)
Scene窗口Resource对象可以设置一些资源模块的常用设置比如打包后的资源模式、资源校验等级以及自动卸载资源间隔等。
![image](src/3-1-1.png)
Menu窗口TEngineSetting可以设置一些资源模块的热更新设置比如资源服务器地址以及在线参数等。备注在Luban目录下有一个基于Node的静态文件服务器可以把在线参数以及AB放入用于做热更新测试。
![image](src/3-1-2.png)
## 重要拓展概念
* AssetReference (资源引用标识) 通用加载资源的时候绑定一个引用标识使你无需关心手动Dispose资源句柄。
* AssetGroup资源组数据进行资源分组绑定管理内存中的生命周期资源生命周期托管给资源组的根节点进行Dispose。
* LruCacheTable (Least Recently Used Cache缓存表)
* ArcCacheTable (Adaptive Replacement Cache缓存表)
## 加载资源示范
注意资源模块默认使用Addressable可寻址定位。传入资源名字无需后缀即可
``` csharp
//同步加载。
GameModule.Resource.LoadAsset<SkillDisplayData>(location);
//异步加载。
GameModule.Resource.LoadAssetAsync<SkillDisplayData>(location, OnLoadSuccess);
private void OnLoadSuccess(AssetOperationHandle assetOperationHandle){}
//使用UniTask异步加载。
await GameModule.Resource.LoadAssetAsync<SkillDisplayData>(location,CancellationToken.None);
```
## 常用接口
remark资源模块初始化的生命周期已经在流程模块实现了具体有需求可以自定义开发。
``` csharp
/// <summary>
/// 获取当前资源包版本。
/// </summary>
/// <returns>资源包版本。</returns>
public string GetPackageVersion();
/// <summary>
/// 异步更新最新包的版本。
/// </summary>
/// <param name="appendTimeTicks">请求URL是否需要带时间戳。</param>
/// <param name="timeout">超时时间。</param>
/// <returns>请求远端包裹的最新版本操作句柄。</returns>
public UpdatePackageVersionOperation UpdatePackageVersionAsync(bool appendTimeTicks = false, int timeout = 60);
/// <summary>
/// 向网络端请求并更新清单
/// </summary>
/// <param name="packageVersion">更新的包裹版本</param>
/// <param name="autoSaveVersion">更新成功后自动保存版本号,作为下次初始化的版本。</param>
/// <param name="timeout">超时时间默认值60秒</param>
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, bool autoSaveVersion = true, int timeout = 60);
/// <summary>
/// 创建资源下载器,用于下载当前资源版本所有的资源包文件。
/// </summary>
public ResourceDownloaderOperation CreateResourceDownloader();
/// <summary>
/// 清理包裹未使用的缓存文件。
/// </summary>
public ClearUnusedCacheFilesOperation ClearUnusedCacheFilesAsync();
/// <summary>
/// 清理沙盒路径。
/// </summary>
public void ClearSandbox();
/// <summary>
/// 强制执行释放未被使用的资源。
/// </summary>
/// <param name="performGCCollect">是否使用垃圾回收。</param>
public void ForceUnloadUnusedAssets(bool performGCCollect);
/// <summary>
/// 检查资源是否存在。
/// </summary>
/// <param name="assetName">要检查资源的名称。</param>
/// <returns>检查资源是否存在的结果。</returns>
public HasAssetResult HasAsset(string assetName);
/// 同步加载资源。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>资源实例。</returns>
T LoadAsset<T>(string assetName) where T : Object;
/// <summary>
/// 同步加载资源。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <param name="parent">父节点位置。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>资源实例。</returns>
T LoadAsset<T>(string assetName, Transform parent) where T :Object;
/// <summary>
/// 同步加载资源。
/// </summary>
/// <param name="handle">资源操作句柄。</param>
/// <param name="assetName">要加载资源的名称。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>资源实例。</returns>
T LoadAsset<T>(string assetName,out AssetOperationHandle handle) where T : Object;
/// <summary>
/// 同步加载资源。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <param name="handle">资源操作句柄。</param>
/// <param name="parent">父节点位置。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>资源实例。</returns>
T LoadAsset<T>(string assetName, Transform parent,out AssetOperationHandle handle) where T :Object;
/// <summary>
/// 异步加载资源。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <param name="cancellationToken">取消操作Token。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>异步资源实例。</returns>
UniTask<T> LoadAssetAsync<T>(string assetName,CancellationToken cancellationToken) where T : Object;
/// <summary>
/// 异步加载游戏物体。
/// </summary>
/// <param name="assetName">要加载的游戏物体名称。</param>
/// <param name="cancellationToken">取消操作Token。</param>
/// <returns>异步游戏物体实例。</returns>
UniTask<UnityEngine.GameObject> LoadGameObjectAsync(string assetName,CancellationToken cancellationToken);
/// <summary>
/// 同步加载资源并获取句柄。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>同步加载资源句柄。</returns>
AssetOperationHandle LoadAssetGetOperation<T>(string assetName) where T : Object;
/// <summary>
/// 异步加载资源并获取句柄。
/// </summary>
/// <param name="assetName">要加载资源的名称。</param>
/// <typeparam name="T">要加载资源的类型。</typeparam>
/// <returns>异步加载资源句柄。</returns>
AssetOperationHandle LoadAssetAsyncHandle<T>(string assetName) where T : Object;
/// <summary>
/// 同步加载子资源对象
/// </summary>
/// <typeparam name="TObject">资源类型</typeparam>
/// <param name="location">资源的定位地址</param>
public SubAssetsOperationHandle LoadSubAssetsSync<TObject>(string location) where TObject : UnityEngine.Object;
/// <summary>
/// 异步加载子资源对象
/// </summary>
/// <typeparam name="TObject">资源类型</typeparam>
/// <param name="location">资源的定位地址</param>
public SubAssetsOperationHandle LoadSubAssetsAsync<TObject>(string location) where TObject : UnityEngine.Object;
/// <summary>
/// 同步加载子资源对象
/// </summary>
/// <param name="assetInfo">资源信息。</param>
public SubAssetsOperationHandle LoadSubAssetsSync(AssetInfo assetInfo);
/// <summary>
/// 异步加载场景。
/// </summary>
/// <param name="location">场景的定位地址</param>
/// <param name="sceneMode">场景加载模式</param>
/// <param name="activateOnLoad">加载完毕时是否主动激活</param>
/// <param name="priority">优先级</param>
/// <returns>异步加载场景句柄。</returns>
SceneOperationHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100);
/// <summary>
/// 异步加载场景
/// </summary>
/// <param name="assetInfo">场景的资源信息</param>
/// <param name="sceneMode">场景加载模式</param>
/// <param name="activateOnLoad">加载完毕时是否主动激活</param>
/// <param name="priority">优先级</param>
/// <returns>异步加载场景句柄。</returns>
SceneOperationHandle LoadSceneAsync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100);
```

69
Books/3-2-事件模块.md Normal file
View File

@@ -0,0 +1,69 @@
# 3-2.事件模块 - GameEvent
高效且无GC的事件系统GameEvent可以指定事件ID/事件String监听和分发事件。通过事件来驱动模块如战斗的角色身上的事件流、UI和网络以及Model的数据流、开发中的绝大部分情况都可以通过事件来进行驱动。(配合UI模块或者拓展的战斗模块实现MVE[Model - View - Event]事件驱动架构)
事件模块支持string和int作为事件Id但推荐是使用int因为可以避免事件字典的哈希碰撞。这里实现了StringId.StringToHash的方法来定义事件ID达到事件系统的最佳性能。
<strong>UI模块的事件和UI生命周期存在绑定销毁UI时可以自动移除UI所监听的事件,开发过程中只需要关心添加事件避免了关闭UI但没有移除事件监听的问题角色模块也可以参考实现。(AddUIEvent)</strong>
``` csharp
public static readonly int Hellp = StringId.StringToHash("Hellp.Hellp");
class A
{
public A()
{
//添加事件监听string
GameEvent.AddEventListener("TEngine很好用",TodoSomeThings);
//添加事件监听int 事件ID
GameEvent.AddEventListener(Hellp,TodoSomeThings2);
}
}
class B
{
private void SaySomeThings()
{
//发送事件流
GameEvent.Send("TEngine很好用");
GameEvent.Send(Hellp);
}
}
【举个例子游戏中血量扣除的时候服务器发来了一个减少Hp的消息包
我们可以在收到这个消息包的时候发送一个事件流在玩家头顶的HP进度
条组件/左上角Hp的UI血条组件添加一个监听事件各个模块负责自己监听后的逻辑】
Server -> SendMessage(ReduceHP)
class ClientHandle
{
private void HandleMessage(MainPack mainpack)
{
...
HpPack hpPack = mainpack.hpPack;
int playerId = mainpack.playerId;
var player = PlayerMgr.Instance.GetPlayer(playerId);
if(player != null){
player.Event.Send("Hpchange",hpPack); //局部的事件管理器
GameEvent.Send("Hpchange",hpPack); //全局事件中心
}
}
}
class PlayerHp
{
public ECSEventCmpt Event { get; set; }
PlayerHp(){
Event.AddEventListener<HpPack>(Hellp,HandleUpChange);
}
}
[Window(UILayer.UI)]
class BattleMainUI: UIWindow
{
public override void RegisterEvent()
{
AddUIEvent<HpPack>(Hellp,HandleUpChange);
}
public void HandleUpChange(HpPack pack){}
}
```

View File

@@ -0,0 +1,23 @@
# 3-3.内存池模块 - MemoryPool
内存池更为轻量化,相对于对象池更适合一些更抽象碎片化的内存对象。
Scene窗口MemoryPool对象可以设置内存池检查防止回收问题与内存泄漏问题。
![image](src/3-3-1.png)
使用案例
``` csharp
/// <summary>
/// 资源组数据。
/// <remarks>DisposeGroup。</remarks>
/// </summary>
public class AssetGroup : IMemory
{
public void Clear(){}
}
//内存池中获取/生成内存对象。
AssetGroup assetGroup = MemoryPool.Acquire<AssetGroup>();
//释放内存对象还给内存池。
MemoryPool.Release(assetGroup);
```

View File

@@ -0,0 +1,64 @@
# 3-4.对象池模块 - ObjectModule
对象池较中量级,在客户端开发中是一个经常使用的技术,技术点我相信大家都懂,这里不过多讨论。
使用案例
``` csharp
/// <summary>
/// Actor对象。
/// </summary>
public class Actor : ObjectBase
{
/// <summary>
/// 释放对象。
/// </summary>
/// <param name="isShutdown">是否是关闭对象池时触发。</param>
protected override void Release(bool isShutdown){}
/// <summary>
/// 创建Actor对象。
/// </summary>
/// <param name="actorName">对象名称。</param>
/// <param name="target">对象持有实例。</param>
/// <returns></returns>
public static Actor Create(string name, object target)
{
var actor = MemoryPool.Acquire<Actor>();
actor.Initialize(name, target);
return actor;
}
}
/// <summary>
/// Actor对象池。
/// </summary>
private IObjectPool<Actor> _actorPool;
void Start()
{
//创建允许单次获取的对象池。
_actorPool = GameModule.ObjectPool.CreateSingleSpawnObjectPool<Actor>(Utility.Text.Format("Actor Instance Pool ({0})", name));
}
/// <summary>
/// 创建Actor对象。
/// </summary>
/// <param name="actorName">对象名称。</param>
/// <param name="target">对象持有实例。</param>
/// <returns>Actor对象实例</returns>
public Actor CreateActor(string actorName, GameObject target)
{
Actor ret = null;
if (_actorPool.CanSpawn())
{
ret = _actorPool.Spawn();
}
else
{
ret = Actor.Create(actorName, target);
_actorPool.Register(ret,true);
}
return ret;
}
```

126
Books/3-5-UI模块.md Normal file
View File

@@ -0,0 +1,126 @@
# 3-5.UI模块 - UIModule
一个游戏70%都是UI剩下30%才是GamePlay所以有一套简洁强大的商业化UI模块以及UI开发工作流将是项目的一大利器能够提高至少一倍的开发效率。(配合事件模块实现MVE[Model - View - Event]事件驱动架构)
UI脚本为纯C#实现脱离Mono的生命周期由UIModule的帧更新驱动并管理UI的生命周期。
IUIBehaviour为UI通用行为接口、UIBase为UI基类、UIWindow为UI窗口基类UIWidget为UI组件基类。
## 前期配置:
注意m_item节点为特殊节点表示是UI下的UIWidget组件不会继续往下遍历生成UI代码。若需要这个UIWidget组件m_item的代码则在m_item右键生成这个组件的UI脚本。
Scene窗口下右键ScriptGenerator菜单下About目录有默认UI命名前缀规范。
![image](src/3-5-1.png)
有自定义需求可以在TEngineSetting下进行自定义。
![image](src/3-5-2.png)
### 开发工作流:
1.遵守前期默认配置或者自定义配置进行UI编排
![image](src/3-5-3.png)
2.在UI的根节点右键ScriptGenerator生成UI代码到剪贴板上注-使用-UniTask的生成代码可以做异步事件流驱动的UI。
![image](src/3-5-4.png)
3.自行创建UI脚本到需要的目录下并复制UI脚本。
## 举例示范
``` csharp
// 同步打开面板
GameModule.UI.ShowUI<GameMainUI>([nullable]userData);
// 异步打开面板
GameModule.UI.ShowUIAsync<GameMainUI>([nullable]userData);
namespace GameLogic
{
/// <summary>
/// BattleMainUI面板
/// <remarks>UIWindow需要以下特性UILayer可以自行定义fullScreen表示为全屏面板会停止和隐藏这个面板堆栈后面的面板。</remarks>
/// </summary>
[Window(UILayer.Bottom,fullScreen:true)]
class BattleMainUI : UIWindow
{
private TouchMove m_touchView;
#region 脚本工具生成的代码
private RectTransform m_rectContainer;
private GameObject m_itemTouch;
private Button m_btnLeaveBattle;
private GameObject m_goTopInfo;
private Button m_btnPause;
public override void ScriptGenerator()
{
m_rectContainer = FindChildComponent<RectTransform>("m_rectContainer");
m_itemTouch = FindChild("m_rectContainer/m_itemTouch").gameObject;
m_btnLeaveBattle = FindChildComponent<Button>("m_btnLeaveBattle");
m_goTopInfo = FindChild("m_goTopInfo").gameObject;
m_btnPause = FindChildComponent<Button>("m_goTopInfo/m_btnPause");
m_btnLeaveBattle.onClick.AddListener(OnClickLeaveBattleBtn);
m_btnPause.onClick.AddListener(OnClickPauseBtn);
}
#endregion
#region 事件
private void OnClickPauseBtn()
{
BattleSys.Instance.Pause = !BattleSys.Instance.Pause;
}
private void OnClickLeaveBattleBtn()
{
BattleSys.Instance.StopBattle(isBattleEnd:false,isWin:false);
}
#endregion
//注册事件举例
public override void RegisterEvent()
{
//通过AddUIEvent这样注册事件会把事件的生命周期绑定给面板面板销毁的时候自动移除监听。
AddUIEvent(ActorLogicEventDefined.OnMainPlayerBagDataChange, RefreshUI);
}
public override void BindMemberProperty()
{
//特殊的m_item节点的域不属于父级UIWindows所以如注意所说需要同样创建这个UIWidget的脚本并生成代码过去。 可以如下创建或者走type、path创建。
m_touchView = CreateWidget<TouchMove>(m_itemTouch);
}
......
}
}
namespace GameLogic
{
/// <summary>
/// 移动操作UIWidget。
/// </summary>
class TouchMove : UIWidget, IUICtrlMove
{
public override void BindMemberProperty()
{
}
//注意Update只有在重写了此方法才会驱动这个Widget或者面板的Update。
public override void OnUpdate()
{
TProfiler.BeginSample("CheckMoveTouchFinger");
CheckMoveTouchFinger();
TProfiler.EndSample();
TProfiler.BeginSample("UpdateTouchMovePos");
UpdateTouchMovePos();
TProfiler.EndSample();
TProfiler.BeginSample("UpdateKeyMove");
UpdateKeyMove();
TProfiler.EndSample();
}
......
}
}
```
## UI进阶
UI面板需要标记UIWindowAttribute以标识层级(可以自行定义)和是否全屏。全屏面板则会把下层面板的Visible设置为false。
![image](src/3-5-5.png)

View File

@@ -0,0 +1,63 @@
# 3-6.配置表模块 - ConfigSystem
接入最佳游戏配置解决方案 - <a href="https://github.com/focus-creative-games/luban"><strong>Luban</strong></a>
<a href="https://luban.doc.code-philosophy.com/#/manual/traits"><strong>Luban文档 </strong></a>
### 在TEngine中Luban配置表目录位于以下目录
![image](src/3-6-1.png)
### 安装luban配置表
1.在TEngine根目录同级克隆下最新的luban-next仓库。
![image](src/3-6-2.png)
2.Tools目录执行build-luban完成
![image](src/3-6-3.png)
3.转表则去luban配置目录执行对应bat
TEngine内置默认使用懒加载配置也支持基于UniTask的异步加载同步加载包括服务器的Task异步加载使用对应转表的bat即可。
### 介绍
luban是你的最佳游戏配置解决方案。
luban高效地处理游戏开发中常见的excel、json、xml之类的数据检查数据错误生成c#等各种语言的代码导出成bytes或json等多种格式。
luban统一了游戏配置开发工作流极大提升了策划和程序的工作效率。
核心特性
强大的数据解析和转换能力 {excel(csv,xls,xlsx)、json、bson、xml、yaml、lua、unity ScriptableObject} => {binary、json、bson、xml、lua、yaml、erlang、 custom format}
增强的excel格式可以简洁地配置出像简单列表、子结构、结构列表以及任意复杂的深层次的嵌套结构。
完备的类型系统支持OOP类型继承搭配excel、json、lua、xml等格式数据灵活优雅表达行为树、技能、剧情、副本之类复杂GamePlay数据
支持生成c#、java、go、c++、lua、python、javascript、typescript、erlang、rust、gdscript 代码
支持生成 protobuf(schema + binary + json)、flatbuffers(schema + json)、msgpack(binary)
强大的数据校验能力。ref引用检查、path资源路径、range范围检查等等
完善的本地化支持。静态文本值本地化、动态文本值本地化、时间本地化、main-patch多地区版本
强大灵活的自定义能力,支持自定义代码模板和数据模板
通用型生成和缓存工具。也可以用于生成协议、数据库之类的代码,甚至可以用作对象缓存服务。
---
使用案例
``` csharp
/// <summary>
/// 道具配置表管理器。
/// </summary>
public class ItemConfigMgr: Singleton<ItemConfigMgr>
{
/// <summary>
/// 道具Table。
/// </summary>
private TbItem TbItem => ConfigLoader.Instance.Tables.TbItem;
/// <summary>
/// 获取道具配置表。
/// </summary>
/// <param name="itemId">道具Id。</param>
/// <returns>道具配置表。</returns>
public ItemConfig GetItemConfig(int itemId)
{
TbItem.DataMap.TryGetValue(itemId, out var config);
return config;
}
}
```

27
Books/3-7-流程模块.md Normal file
View File

@@ -0,0 +1,27 @@
# 7.流程模块 - ProcedureModule
### ProcedureLaunch - 流程启动
### ProcedureSplash - 流程闪屏
### ProcedureInitPackage - 流程初始化Package
### ProcedurePreload - 流程预加载
### ProcedureInitResources - 流程初始化Resources
### ProcedureUpdateVersion - 流程更新版本Version
### ProcedureUpdateManifest - 流程更新Mainfest清单
### ProcedureCreateDownloader - 流程创建下载器
### ProcedureDownloadFile - 流程下载文件
### ProcedureDownloadOver - 流程下载文件结束
### ProcedureClearCache - 流程清理缓存
### ProcedureLoadAssembly - 流程加载进入热更新程序集
### ProcedureStartGame - 流程开始游戏

View File

@@ -0,0 +1,2 @@
# 8.网络模块 - Network
待补充

View File

@@ -0,0 +1,26 @@
# TEngine各平台下运行
### 日志记录编辑器下运行
![image](src/Editor-RunSuccessed.png)
---
### Win64位包运行
![image](src/Win64-RunSuccessed.png)
---
### 安卓真机运行
![image](src/Android-RunSuccessed.png)
### IOS真机运行
![image](src/Iphone-RunSuccessed.png)
### WebGL真机运行
![image](src/WebGL-RunSuccessed.png)
### 索尼 PS5 真机运行
![image](src/Console%20Viewer.png)
![image](src/Console%20Output.png)

16
Books/Donate.md Normal file
View File

@@ -0,0 +1,16 @@
## <strong>Buy me a coffee.
您的赞助会让我们做得更快更好如果觉得TEngine对您有帮助不妨赞助我买杯咖啡吧~
<p align="center">
<img src="src/Donate-微信.jpg" alt="logo" width="384" height="562">
</p>
<p align="center">
<img src="src/Donate-支付宝.jpg" alt="logo" width="384" height="562">
</p>

BIN
Books/src/1-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
Books/src/1-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

BIN
Books/src/2-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
Books/src/3-1-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

BIN
Books/src/3-1-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
Books/src/3-3-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

BIN
Books/src/3-5-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
Books/src/3-5-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
Books/src/3-5-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
Books/src/3-5-4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
Books/src/3-5-5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

BIN
Books/src/3-6-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
Books/src/3-6-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
Books/src/3-6-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

BIN
Books/src/Donate-微信.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
Books/src/TEngine512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

View File

@@ -0,0 +1,9 @@
cd /d %~dp0
call path_define.bat
%UNITYEDITOR_PATH%/Unity.exe %WORKSPACE% -logFile %BUILD_LOGFILE% -executeMethod TEngine.ReleaseTools.AutomationBuildAndroid -quit -batchmode -CustomArgs:Language=en_US; %WORKSPACE%
@REM for /f "delims=[" %%i in (%BUILD_LOGFILE%) do echo %%i
pause

18
BuildCLI/build_android.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
cd "$(dirname "$0")"
source ./path_define.sh
"${UNITYEDITOR_PATH}/Unity" "${WORKSPACE}" \
-logFile "${BUILD_LOGFILE}" \
-executeMethod TEngine.ReleaseTools.AutomationBuildAndroid \
-quit -batchmode \
-CustomArgs:Language=en_US "${WORKSPACE}"
while IFS= read -r line; do
echo "$line"
done < "${BUILD_LOGFILE}"
echo "按任意键继续..."
read -k1

6
BuildCLI/path_define.bat Normal file
View File

@@ -0,0 +1,6 @@
cd /d %~dp0
set WORKSPACE=G:/github/TEngine/UnityProject
set UNITYEDITOR_PATH=G:/UnityEditor/2021.3.20f1c1/Editor
set BUILD_DLL_LOGFILE=./build_dll.log
set BUILD_LOGFILE=./build.log

14
BuildCLI/path_define.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
cd "$(dirname "$0")"
export WORKSPACE="/Users/your_user/github/TEngine/UnityProject" # 请替换为 macOS 上的实际路径
export UNITYEDITOR_PATH="/Applications/Unity/Hub/Editor/2021.3.20f1c1/Unity.app/Contents/MacOS" # 请替换为 macOS 上的 Unity 路径
export BUILD_DLL_LOGFILE="./build_dll.log"
export BUILD_LOGFILE="./build.log"
echo "环境变量已设置:"
echo "WORKSPACE=${WORKSPACE}"
echo "UNITYEDITOR_PATH=${UNITYEDITOR_PATH}"
echo "BUILD_DLL_LOGFILE=${BUILD_DLL_LOGFILE}"
echo "BUILD_LOGFILE=${BUILD_LOGFILE}"

View File

@@ -0,0 +1,58 @@
using Luban;
using GameConfig;
using TEngine;
using UnityEngine;
/// <summary>
/// 配置加载器。
/// </summary>
public class ConfigSystem
{
private static ConfigSystem _instance;
public static ConfigSystem Instance => _instance ??= new ConfigSystem();
private bool _init = false;
private Tables _tables;
public Tables Tables
{
get
{
if (!_init)
{
Load();
}
return _tables;
}
}
private IResourceModule _resourceModule;
/// <summary>
/// 加载配置。
/// </summary>
public void Load()
{
_tables = new Tables(LoadByteBuf);
_init = true;
}
/// <summary>
/// 加载二进制配置。
/// </summary>
/// <param name="file">FileName</param>
/// <returns>ByteBuf</returns>
private ByteBuf LoadByteBuf(string file)
{
if (_resourceModule == null)
{
_resourceModule = ModuleSystem.GetModule<IResourceModule>();
}
TextAsset textAsset = _resourceModule.LoadAsset<TextAsset>(file);
byte[] bytes = textAsset.bytes;
return new ByteBuf(bytes);
}
}

View File

@@ -0,0 +1,55 @@
using Luban;
{{namespace_with_grace_begin __namespace}}
public partial class {{__name}}
{
#region The Tables
{{~for table in __tables ~}}
{{~if table.comment != '' ~}}
/// <summary>
/// {{escape_comment table.comment}}
/// </summary>
{{~end~}}
private {{table.full_name}} m_{{table.name}};
public {{table.full_name}} {{format_property_name __code_style table.name}}
{
get
{
if (m_{{table.name}} == null)
{
m_{{table.name}} = new {{table.full_name}}(defaultLoader("{{table.output_data_file}}"));
m_{{table.name}}.ResolveRef(this);
}
return m_{{table.name}};
}
set
{
m_{{table.name}} = value;
m_{{table.name}}.ResolveRef(this);
}
}
{{~end~}}
#endregion
System.Func<string, ByteBuf> defaultLoader;
public {{__name}}(System.Func<string, ByteBuf> loader)
{
SetDefaultLoader(loader);
Init();
}
public void SetDefaultLoader(System.Func<string, ByteBuf> loader)
{
defaultLoader = null;
defaultLoader = loader;
}
//public partial void Init();
public void Init(){}
}
{{namespace_with_grace_end __namespace}}

View File

@@ -0,0 +1,29 @@
using UnityEngine;
public static class ExternalTypeUtil
{
public static Vector2 NewVector2(GameConfig.vector2 v)
{
return new Vector2(v.X, v.Y);
}
public static Vector3 NewVector3(GameConfig.vector3 v)
{
return new Vector3(v.X, v.Y, v.Z);
}
public static Vector4 NewVector4(GameConfig.vector4 v)
{
return new Vector4(v.X, v.Y, v.Z, v.W);
}
public static Vector2Int NewVector2Int(GameConfig.vector2int v)
{
return new Vector2Int(v.X, v.Y);
}
public static Vector3Int NewVector3Int(GameConfig.vector3int v)
{
return new Vector3Int(v.X, v.Y, v.Z);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,46 @@
<module name="">
<bean name="vector2" valueType="1" sep=",">
<var name="x" type="float" />
<var name="y" type="float" />
<mapper target="client" codeTarget="cs-bin,cs-simple-json,cs-newtonsoft-json">
<option name="type" value="UnityEngine.Vector2" />
<option name="constructor" value="ExternalTypeUtil.NewVector2" />
</mapper>
</bean>
<bean name="vector3" valueType="1" sep=",">
<var name="x" type="float" />
<var name="y" type="float" />
<var name="z" type="float" />
<mapper target="client" codeTarget="cs-bin,cs-simple-json,cs-newtonsoft-json">
<option name="type" value="UnityEngine.Vector3" />
<option name="constructor" value="ExternalTypeUtil.NewVector3" />
</mapper>
</bean>
<bean name="vector4" valueType="1" sep=",">
<var name="x" type="float" />
<var name="y" type="float" />
<var name="z" type="float" />
<var name="w" type="float" />
<mapper target="client" codeTarget="cs-bin,cs-simple-json,cs-newtonsoft-json">
<option name="type" value="UnityEngine.Vector4" />
<option name="constructor" value="ExternalTypeUtil.NewVector4" />
</mapper>
</bean>
<bean name="vector2int" valueType="1" sep=",">
<var name="x" type="int" />
<var name="y" type="int" />
<mapper target="client" codeTarget="cs-bin,cs-simple-json,cs-newtonsoft-json">
<option name="type" value="UnityEngine.Vector2Int" />
<option name="constructor" value="ExternalTypeUtil.NewVector2Int" />
</mapper>
</bean>
<bean name="vector3int" valueType="1" sep=",">
<var name="x" type="int" />
<var name="y" type="int" />
<var name="z" type="int" />
<mapper target="client" codeTarget="cs-bin,cs-simple-json,cs-newtonsoft-json">
<option name="type" value="UnityEngine.Vector3" />
<option name="constructor" value="ExternalTypeUtil.NewVector3" />
</mapper>
</bean>
</module>

View File

@@ -0,0 +1,22 @@
Cd /d %~dp0
echo %CD%
set WORKSPACE=../..
set LUBAN_DLL=%WORKSPACE%\Tools\Luban\Luban.dll
set CONF_ROOT=.
set DATA_OUTPATH=%WORKSPACE%/UnityProject/Assets/AssetRaw/Configs/bytes/
set CODE_OUTPATH=%WORKSPACE%/UnityProject/Assets/GameScripts/HotFix/GameProto/GameConfig/
xcopy /s /e /i /y "%CONF_ROOT%\CustomTemplate\ConfigSystem.cs" "%WORKSPACE%\UnityProject\Assets\GameScripts\HotFix\GameProto\ConfigSystem.cs"
xcopy /s /e /i /y "%CONF_ROOT%\CustomTemplate\ExternalTypeUtil.cs" "%WORKSPACE%\UnityProject\Assets\GameScripts\HotFix\GameProto\ExternalTypeUtil.cs"
dotnet %LUBAN_DLL% ^
-t client ^
-c cs-bin ^
-d bin^
--conf %CONF_ROOT%\luban.conf ^
-x code.lineEnding=crlf ^
-x outputCodeDir=%CODE_OUTPATH% ^
-x outputDataDir=%DATA_OUTPATH%
pause

View File

@@ -0,0 +1,27 @@
#!/bin/bash
cd "$(dirname "$0")"
echo "当前目录: $(pwd)"
export WORKSPACE="$(realpath ../../)"
export LUBAN_DLL="${WORKSPACE}/Tools/Luban/Luban.dll"
export CONF_ROOT="$(pwd)"
export DATA_OUTPATH="${WORKSPACE}/UnityProject/Assets/AssetRaw/Configs/bytes/"
export CODE_OUTPATH="${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/GameConfig/"
cp -R "${CONF_ROOT}/CustomTemplate/ConfigSystem.cs" \
"${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/ConfigSystem.cs"
cp -R "${CONF_ROOT}/CustomTemplate/ExternalTypeUtil.cs" \
"${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/ExternalTypeUtil.cs"
dotnet "${LUBAN_DLL}" \
-t client \
-c cs-bin \
-d bin \
--conf "${CONF_ROOT}/luban.conf" \
-x code.lineEnding=crlf \
-x outputCodeDir="${CODE_OUTPATH}" \
-x outputDataDir="${DATA_OUTPATH}"
echo "操作完成,按任意键退出..."
read -k1

View File

@@ -0,0 +1,23 @@
Cd /d %~dp0
echo %CD%
set WORKSPACE=../..
set LUBAN_DLL=%WORKSPACE%\Tools\Luban\Luban.dll
set CONF_ROOT=.
set DATA_OUTPATH=%WORKSPACE%/UnityProject/Assets/AssetRaw/Configs/bytes/
set CODE_OUTPATH=%WORKSPACE%/UnityProject/Assets/GameScripts/HotFix/GameProto/GameConfig/
xcopy /s /e /i /y "%CONF_ROOT%\CustomTemplate\ConfigSystem.cs" "%WORKSPACE%\UnityProject\Assets\GameScripts\HotFix\GameProto\ConfigSystem.cs"
xcopy /s /e /i /y "%CONF_ROOT%\CustomTemplate\ExternalTypeUtil.cs" "%WORKSPACE%\UnityProject\Assets\GameScripts\HotFix\GameProto\ExternalTypeUtil.cs"
dotnet %LUBAN_DLL% ^
-t client ^
-c cs-bin ^
-d bin^
--conf %CONF_ROOT%\luban.conf ^
--customTemplateDir %CONF_ROOT%\CustomTemplate\CustomTemplate_Client_LazyLoad ^
-x code.lineEnding=crlf ^
-x outputCodeDir=%CODE_OUTPATH% ^
-x outputDataDir=%DATA_OUTPATH%
pause

View File

@@ -0,0 +1,28 @@
#!/bin/bash
cd "$(dirname "$0")"
echo "当前目录: $(pwd)"
export WORKSPACE="$(realpath ../../)"
export LUBAN_DLL="${WORKSPACE}/Tools/Luban/Luban.dll"
export CONF_ROOT="$(pwd)"
export DATA_OUTPATH="${WORKSPACE}/UnityProject/Assets/AssetRaw/Configs/bytes/"
export CODE_OUTPATH="${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/GameConfig/"
cp -R "${CONF_ROOT}/CustomTemplate/ConfigSystem.cs" \
"${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/ConfigSystem.cs"
cp -R "${CONF_ROOT}/CustomTemplate/ExternalTypeUtil.cs" \
"${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GameProto/ExternalTypeUtil.cs"
dotnet "${LUBAN_DLL}" \
-t client \
-c cs-bin \
-d bin \
--conf "${CONF_ROOT}/luban.conf" \
--customTemplateDir "${CONF_ROOT}/CustomTemplate/CustomTemplate_Client_LazyLoad" \
-x code.lineEnding=crlf \
-x outputCodeDir="${CODE_OUTPATH}" \
-x outputDataDir="${DATA_OUTPATH}"
echo "操作完成,按任意键退出..."
read -k1

View File

@@ -0,0 +1,19 @@
Cd /d %~dp0
echo %CD%
set WORKSPACE=../../
set LUBAN_DLL=%WORKSPACE%/Tools/Luban/Luban.dll
set CONF_ROOT=.
set DATA_OUTPATH=%WORKSPACE%/Server/GameConfig
set CODE_OUTPATH=%WORKSPACE%/Server/Hotfix/Config/GameConfig
dotnet %LUBAN_DLL% ^
-t server^
-c cs-bin ^
-d bin^
--conf %CONF_ROOT%\luban.conf ^
-x code.lineEnding=crlf ^
-x outputCodeDir=%CODE_OUTPATH% ^
-x outputDataDir=%DATA_OUTPATH%
pause

View File

@@ -0,0 +1,22 @@
#!/bin/bash
cd "$(dirname "$0")"
echo "当前目录: $(pwd)"
export WORKSPACE="$(realpath ../../)"
export LUBAN_DLL="${WORKSPACE}/Tools/Luban/Luban.dll"
export CONF_ROOT="$(pwd)"
export DATA_OUTPATH="${WORKSPACE}/Server/GameConfig"
export CODE_OUTPATH="${WORKSPACE}/Server/Hotfix/Config/GameConfig"
dotnet "${LUBAN_DLL}" \
-t server \
-c cs-bin \
-d bin \
--conf "${CONF_ROOT}/luban.conf" \
-x code.lineEnding=crlf \
-x outputCodeDir="${CODE_OUTPATH}" \
-x outputDataDir="${DATA_OUTPATH}"
echo "操作完成,按任意键退出..."
read -k1

View File

@@ -0,0 +1,22 @@
{
"groups":
[
{"names":["c"], "default":true},
{"names":["s"], "default":true},
{"names":["e"], "default":true}
],
"schemaFiles":
[
{"fileName":"Defines", "type":""},
{"fileName":"Datas/__tables__.xlsx", "type":"table"},
{"fileName":"Datas/__beans__.xlsx", "type":"bean"},
{"fileName":"Datas/__enums__.xlsx", "type":"enum"}
],
"dataDir": "Datas",
"targets":
[
{"name":"server", "manager":"Tables", "groups":["s"], "topModule":"GameConfig"},
{"name":"client", "manager":"Tables", "groups":["c"], "topModule":"GameConfig"},
{"name":"all", "manager":"Tables", "groups":["c,s,e"], "topModule":"GameConfig"}
]
}

View File

@@ -33,9 +33,6 @@
#### TEngine是一个简单(新手友好开箱即用)且强大的Unity框架全平台解决方案,对于需要一套上手快、文档清晰、高性能且可拓展性极强的商业级解决方案的开发者或者团队来说是一个很好的选择。
## <a href="http://1.12.241.46:5000/"><strong>文档快速入门 »</strong></a>
## 文档快速预览 - 5分钟
* [全平台跑通示意](Books/99-各平台运行RunAble.md): 全平台跑通示意。
* [01_介绍](Books/0-介绍.md): 简单介绍。
@@ -46,49 +43,49 @@
* [06_对象池模块](Books/3-4-%E5%AF%B9%E8%B1%A1%E6%B1%A0%E6%A8%A1%E5%9D%97.md): 展示对象池模块概览。
* [07_配置表模块](Books/3-6-%E9%85%8D%E7%BD%AE%E8%A1%A8%E6%A8%A1%E5%9D%97.md): 展示配置表模块概览。
* [08_流程模块](Books/3-7-%E6%B5%81%E7%A8%8B%E6%A8%A1%E5%9D%97.md): 展示商业化流程模块。
* [09_UI模块](Books/3-5-UI模块.md): 展示商业化UI模块。
## <strong>为什么要使用TEngine
0. 开箱即用5分钟即可上手整套开发流程代码整洁思路清晰功能强大。高内聚低耦合。您可以很轻易的把您不需要的模块进行移除替换。
1. 严格按照商业要求使用次世代的HybridClr进行热更新、最佳的Luban配置表(TEngine支持懒加载、异步加载、同步加载配置。)、百万DAU游戏验证过的YooAsset资源框架框架管理资源引用与释放。全平台热更新流程已跑通。
2. 严格按照商业化流程执行的热更新、商业化的UI开发流程、以及资源管理等等设计并实现了YooAsset资源自动释放、支持LRU、ARC严格管理资源内存。
3. C#双端解决方案服务器使用Fantasy是一套源于ETServer但极为简洁性能更强更好上手的一套商业级服务器框架
4. 支持全平台已有项目使用TEngine上架Steam、Wechat-minigame、AppStore。
3. 支持全平台已有项目使用TEngine上架Steam、Wechat-minigame、AppStore
## <strong>资源重要拓展概念
* AssetReference (资源引用标识) 通用加载资源的时候绑定一个引用标识使你无需关心手动Dispose资源句柄。
## <strong>最新的Demo飞机大战位于demo分支
* AssetGroup资源组数据进行资源分组绑定管理内存中的生命周期资源生命周期托管给资源组的根节点进行Dispose。
## <strong>服务器相关
TEngine本身为纯净的客户端。不强绑定任何服务器。但是个人开发以及中小型公司开发双端则推荐C#服务器
* LruCacheTable (Least Recently Used Cache缓存表)
* ArcCacheTable (Adaptive Replacement Cache缓存表)
## <strong>为什么服务器使用C#
Net Core现在已经更新到了8.0的版本在性能和设计上其实是远超JAVA和GO。在JAVAER还在为JVM更新和添加更多功能时其实他们已经被国内大环境所包围了看不到.Net Core的性能之强组件化的结构。国内大环境是JAVA和GO的天下这个不可否认但是国外C#也确实很多。其实.Net Core最大的问题是大多数自己人都不知道他的优点(AOT、JIT混合编译、热重载等等)甚至很多守旧派抵制core。GO喜欢吹性能但其实目前来看除了协程的轻量级大多数性能测试其实不如JAVA和.Net。简单可以说出了C++的性能以外Net Core其实都打得过。
<strong>当然作为商业级解决方案服务器的耦合度也极低,如果不喜欢您也可以很轻松直接移除替换成你的服务器。</strong>
需要服务器可以合并<a href="https://github.com/ALEXTANGXIAO/GameNetty"><strong>GameNetty</strong></a>过来或者分支Fantasy为接好的带有Fantasy服务器的双端分支。
## <strong>项目结构概览
```
Assets
├── AssetArt // 美术资源目录
│ └── Atlas // 自动生成图集目录
├── AssetRaw // 热更资源目录
├── Atlas // 自动生成图集目录
│ ├── UIRaw // UI图片目录
│ │ ├── Atlas // 需要自动生成图集的UI素材目录
│ │ └── Raw // 不需要自动生成图集的UI素材目录
├── Editor // 编辑器脚本目录
├── HybridCLRData // hybridclr相关目录
├── Scenes // 主场景目录
├── TEngine // 框架核心目录
└── GameScripts // 程序集目录
├── Editor // 编辑器程序集
├── Main // 主程序程序集(启动器与流程)
├── Procedure // 启动器与流程
└── HotFix // 游戏热更程序集目录 [Folder]
├── GameBase // 游戏基础框架程序集 [Dll]
├── GameProto // 游戏配置协议程序集 [Dll]
├── BattleCore // 游戏核心战斗程序集 [Dll]
├── GameProto // 游戏配置协议程序集 [Dll]
└── GameLogic // 游戏业务逻辑程序集 [Dll]
── GameApp.cs // 热更主入口
└── GameApp_RegisterSystem.cs // 热更主入口注册系统
```
── GameApp.cs // 热更主入口
- 必要:项目使用了以下第三方插件,请自行购买导入:
- /Unity/Assets/Plugins/Sirenix
TEngine
├── Editor // TEngine编辑器核心代码
└── Runtime // TEngine运行时核心代码
```
---
## <strong>优质开源项目推荐
@@ -99,4 +96,11 @@ Assets
#### <a href="https://github.com/focus-creative-games/hybridclr"><strong>HybridCLR</strong></a> - 特性完整、零成本、高性能、低内存的近乎完美的Unity全平台原生c#热更方案
#### <a href="https://github.com/qq362946/Fantasy"><strong>Fantasy</strong></a> - Fantasy是一套源于ETServer但极为简洁性能更强,更好上手的一套商业级服务器框架。
#### <a href="https://github.com/qq362946/Fantasy"><strong>Fantasy</strong></a> - Fantasy是一套源于ETServer但极为简洁更好上手的一套商业级服务器框架。
#### <a href="https://github.com/ALEXTANGXIAO/GameNetty"><strong>GameNetty</strong></a> - GameNetty是一套源于ETServer首次拆分最新的ET8.1的前后端解决方案客户端最精简大约750k完美做成包的形式几乎零成本 无侵入的嵌入进你的框架。
## <strong>Buy me a 奶茶.
[您的赞助会让我们做得更快更好如果觉得TEngine对您有帮助不妨请我可爱的女儿买杯奶茶吧~](Books/Donate.md)

8
Tools/FileServer/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
node_modules
*.swap
.idea
.DS_Store
*.log
.vscode
*-lock.json
AssetsRoot

View File

@@ -0,0 +1,42 @@
## 使用node搭建静态资源服务器
### 安装
```bash
npm install yumu-static-server -g
```
### 使用
```bash
server # 会在当前目录下启动一个静态资源服务器默认端口为8080
server -p[port] 3000 # 会在当前目录下启动一个静态资源服务器端口为3000
server -i[index] index.html # 设置文件夹在默认加载的文件
server -c[charset] UTF-8 # 设置文件默认加载的字符编码
server -cors # 开启文件跨域
server -h[https] # 开启https服务
server --openindex # 是否打开默认页面
server --no-openbrowser # 关闭自动打开浏览器
```
### 基本功能
1. 启动静态资源服务器
2. 端口可配置
3. 字符编码可配置
4. 文件夹下默认加载文件可配置
5. 是否跨域可配置
6. 开启https服务
### TODO
- [x] 引入handlerbars编译模板
- [x] 支持文件是否跨域
- [x] 支持https服务

View File

@@ -0,0 +1,26 @@
const StaticServer = require('../src/static-server');
const options = require('yargs')
.option('p', { alias: 'port', describe: '设置服务启动的端口号', type: 'number' })
.option('i', { alias: 'index', describe: '设置默认打开的主页', type: 'string' })
.option('c', { alias: 'charset', describe: '设置文件的默认字符集', type: 'string' })
.option('o', { alias: 'openindex', describe: '是否打开默认页面', type: 'boolean' })
.option('h', { alias: 'https', describe: '是否启用https服务', type: 'boolean' })
.option('cors', { describe: '是否开启文件跨域', type: 'boolean' })
.option('openbrowser', { describe: '是否默认打开浏览器', type: 'boolean' })
// 默认参数
.default('openbrowser', true)
// .default('https', true)
.default('port', 8080)
.default('index', 'index.html')
.default('openindex', 'index.html')
.default('charset', 'UTF-8')
.help()
.alias('?', 'help')
.argv;
const server = new StaticServer(options);
server.start();

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env node
module.exports = require('./bin/app.js');

View File

@@ -0,0 +1 @@
npm install yumu-static-server -g

3
Tools/FileServer/instal.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
npm install yumu-static-server -g

View File

@@ -0,0 +1,30 @@
{
"name": "static-server",
"version": "0.0.1",
"description": "使用node搭建静态资源服务器",
"main": "index.js",
"scripts": {
"dev": "supervisor bin/app.js",
"start": "npm run dev"
},
"bin": {
"server": "index.js"
},
"author": "Alex",
"license": "ISC",
"keywords": [
"static-server",
"server"
],
"dependencies": {
"chalk": "^2.3.2",
"handlebars": "^4.0.11",
"mime": "^2.2.0",
"open": "^7.1.0",
"pem": "^1.12.5",
"yargs": "^6.6.0"
},
"devDependencies": {
"supervisor": "^0.12.0"
}
}

View File

@@ -0,0 +1,12 @@
const path = require('path');
const mime = require('mime');
const lookup = (pathName) => {
let ext = path.extname(pathName);
ext = ext.split('.').pop();
return mime.getType(ext) || mime.getType('txt');
}
module.exports = {
lookup
};

View File

@@ -0,0 +1,334 @@
const http = require('http');
const https = require('https');
const path = require('path');
const fs = require('fs');
const url = require('url');
const zlib = require('zlib');
const chalk = require('chalk');
const os = require('os');
const open = require("open");
const Handlebars = require('handlebars');
const pem = require('pem');
const mime = require('./mime');
const Template = require('./templates');
const _defaultTemplate = Handlebars.compile(Template.page_dafault);
const _404TempLate = Handlebars.compile(Template.page_404);
const hasTrailingSlash = url => url[url.length - 1] === '/';
const ifaces = os.networkInterfaces();
class StaticServer {
constructor(options) {
this.port = options.port;
this.indexPage = options.index;
this.openIndexPage = options.openindex;
this.openBrowser = options.openbrowser;
this.charset = options.charset;
this.cors = options.cors;
this.protocal = options.https ? 'https' : 'http';
this.zipMatch = '^\\.(css|js|html)$';
}
/**
* 响应错误
*
* @param {*} err
* @param {*} res
* @returns
* @memberof StaticServer
*/
respondError(err, res) {
res.writeHead(500);
return res.end(err);
}
/**
* 响应404
*
* @param {*} req
* @param {*} res
* @memberof StaticServer
*/
respondNotFound(req, res) {
res.writeHead(404, {
'Content-Type': 'text/html'
});
const html = _404TempLate();
res.end(html);
}
respond(pathName, req, res) {
fs.stat(pathName, (err, stat) => {
if (err) return respondError(err, res);
this.responseFile(stat, pathName, req, res);
});
}
/**
* 判断是否需要解压
*
* @param {*} pathName
* @returns
* @memberof StaticServer
*/
shouldCompress(pathName) {
return path.extname(pathName).match(this.zipMatch);
}
/**
* 解压文件
*
* @param {*} readStream
* @param {*} req
* @param {*} res
* @returns
* @memberof StaticServer
*/
compressHandler(readStream, req, res) {
const acceptEncoding = req.headers['accept-encoding'];
if (!acceptEncoding || !acceptEncoding.match(/\b(gzip|deflate)\b/)) {
return readStream;
} else if (acceptEncoding.match(/\bgzip\b/)) {
res.setHeader('Content-Encoding', 'gzip');
return readStream.pipe(zlib.createGzip());
}
}
/**
* 响应文件路径
*
* @param {*} stat
* @param {*} pathName
* @param {*} req
* @param {*} res
* @memberof StaticServer
*/
responseFile(stat, pathName, req, res) {
// 设置响应头
res.setHeader('Content-Type', `${mime.lookup(pathName)}; charset=${this.charset}`);
res.setHeader('Accept-Ranges', 'bytes');
// 添加跨域
if (this.cors) res.setHeader('Access-Control-Allow-Origin', '*');
let readStream;
readStream = fs.createReadStream(pathName);
if (this.shouldCompress(pathName)) { // 判断是否需要解压
readStream = this.compressHandler(readStream, req, res);
}
readStream.pipe(res);
}
/**
* 响应重定向
*
* @param {*} req
* @param {*} res
* @memberof StaticServer
*/
respondRedirect(req, res) {
const location = req.url + '/';
res.writeHead(301, {
'Location': location,
'Content-Type': 'text/html'
});
const html = _defaultTemplate({
htmlStr: `Redirecting to <a href='${location}'>${location}</a>`,
showFileList: false
})
res.end(html);
}
/**
* 响应文件夹路径
*
* @param {*} pathName
* @param {*} req
* @param {*} res
* @memberof StaticServer
*/
respondDirectory(pathName, req, res) {
const indexPagePath = path.join(pathName, this.indexPage);
// 如果文件夹下存在index.html则默认打开
if (this.openIndexPage && fs.existsSync(indexPagePath)) {
this.respond(indexPagePath, req, res);
} else {
fs.readdir(pathName, (err, files) => {
if (err) {
respondError(err, res);
}
const requestPath = url.parse(req.url).pathname;
const fileList = [];
files.forEach(fileName => {
let itemLink = path.join(requestPath, fileName);
let isDirectory = false;
const stat = fs.statSync(path.join(pathName, fileName));
if (stat && stat.isDirectory()) {
itemLink = path.join(itemLink, '/');
isDirectory = true;
}
fileList.push({
link: itemLink,
name: fileName,
isDirectory
});
});
// 排序,目录在前,文件在后
fileList.sort((prev, next) => {
if (prev.isDirectory && !next.isDirectory) {
return -1;
}
return 1;
});
res.writeHead(200, {
'Content-Type': 'text/html'
});
const html = _defaultTemplate({
requestPath,
fileList,
showFileList: true
})
res.end(html);
});
}
}
/**
* 路由处理
*
* @param {*} pathName
* @param {*} req
* @param {*} res
* @memberof StaticServer
*/
routeHandler(pathName, req, res) {
const realPathName = pathName.split('?')[0];
fs.stat(realPathName, (err, stat) => {
this.logGetInfo(err, pathName);
if (!err) {
const requestedPath = url.parse(req.url).pathname;
// 检查url
// 如果末尾有'/',且是文件夹,则读取文件夹
// 如果是文件夹,但末尾没'/',则重定向至'xxx/'
// 如果是文件,则判断是否是压缩文件,是则解压,不是则读取文件
if (hasTrailingSlash(requestedPath) && stat.isDirectory()) {
this.respondDirectory(realPathName, req, res);
} else if (stat.isDirectory()) {
this.respondRedirect(req, res);
} else {
this.respond(realPathName, req, res);
}
} else {
this.respondNotFound(req, res);
}
});
}
/**
* 打印ip地址
*
* @memberof StaticServer
*/
logUsingPort() {
const me = this;
console.log(`${chalk.yellow(`Starting up your server\nAvailable on:`)}`);
Object.keys(ifaces).forEach(function (dev) {
ifaces[dev].forEach(function (details) {
if (details.family === 'IPv4') {
console.log(` ${me.protocal}://${details.address}:${chalk.green(me.port)}`);
}
});
});
console.log(`${chalk.cyan(Array(50).fill('-').join(''))}`);
}
/**
* 打印占用端口
*
* @param {*} oldPort
* @param {*} port
* @memberof StaticServer
*/
logUsedPort(oldPort, port) {
const me = this;
console.log(`${chalk.red(`The port ${oldPort} is being used, change to port `)}${chalk.green(me.port)} `);
}
/**
* 打印https证书友好提示
*
* @memberof StaticServer
*/
logHttpsTrusted() {
console.log(chalk.green('Currently is using HTTPS certificate (Manually trust it if necessary)'));
}
/**
* 打印路由路径输出
*
* @param {*} isError
* @param {*} pathName
* @memberof StaticServer
*/
logGetInfo(isError, pathName) {
if (isError) {
console.log(chalk.red(`404 ${pathName}`));
} else {
console.log(chalk.cyan(`200 ${pathName}`));
}
}
startServer(keys) {
const me = this;
let isPostBeUsed = false;
const oldPort = me.port;
const protocal = me.protocal === 'https' ? https : http;
const options = me.protocal === 'https' ? { key: keys.serviceKey, cert: keys.certificate } : null;
const callback = (req, res) => {
const pathName = path.join(process.cwd(), path.normalize(decodeURI(req.url)));
me.routeHandler(pathName, req, res);
};
const params = [callback];
if (me.protocal === 'https') params.unshift(options);
const server = protocal.createServer(...params).listen(me.port);
server.on('listening', function () { // 执行这块代码说明端口未被占用
if (isPostBeUsed) {
me.logUsedPort(oldPort, me.port);
}
me.logUsingPort();
if (me.openBrowser) {
open(`${me.protocal}://127.0.0.1:${me.port}`);
}
});
server.on('error', function (err) {
if (err.code === 'EADDRINUSE') { // 端口已经被使用
isPostBeUsed = true;
me.port = parseInt(me.port) + 1;
server.listen(me.port);
} else {
console.log(err);
}
})
}
start() {
const me = this;
if (this.protocal === 'https') {
pem.createCertificate({ days: 1, selfSigned: true }, function (err, keys) {
if (err) {
throw err
}
me.logHttpsTrusted();
me.startServer(keys);
})
} else {
me.startServer();
}
}
}
module.exports = StaticServer;

View File

@@ -0,0 +1,44 @@
module.exports = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>node静态服务器</title>
<style>
.not-found-content {
display: flex;
justify-content: center;
min-height: 500px;
align-items: center;
}
.not-found-content .img-notfound {
margin-right: 50px;
}
.not-found-content h3 {
color: #333;
font-size: 24px;
margin: 20px 0;
font-weight: 400;
line-height: 24px;
}
.not-found-content p {
color: #666;
font-size: 16px;
line-height: 20px;
margin-bottom: 7px;
}
</style>
</head>
<body>
<div class="not-found-content">
<img src="https://img.alicdn.com/tfs/TB1txw7bNrI8KJjy0FpXXb5hVXa-260-260.png" class="img-notfound" alt="not found">
<div class="prompt">
<h3>抱歉,你访问的路径不存在</h3>
<p>您要找的页面没有找到,请返回<a class="link-font" href="/">首页</a>继续浏览</p>
</div>
</div>
</body>
</html>
`

View File

@@ -0,0 +1,93 @@
module.exports = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>node静态服务器</title>
<style>
html, body, ul, li, p{
padding: 0;
margin: 0;
}
html, body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
.app {
padding: 20px 50px 0;
min-height: calc(100% - 70px);
overflow: hidden;
color: #333;
}
.directory li {
list-style: circle;
margin-left: 20px;
}
.directory li p {
line-height: 1.7;
margin: 14px 0;
}
.directory li p a{
color: #333;
font-weight: 400;
text-decoration: none;
}
.directory li p span{
color: #3dcccc;
}
.directory li p a:hover {
color: red;
}
.footer {
text-align: center;
height: 50px;
font-size: 12px;
}
.footer span {
display: block;
line-height: 24px;
}
.footer .bold {
font-weight: 600;
}
.footer a {
color: #333;
}
.footer a:hover {
color: red;
}
</style>
</head>
<body>
<div class="app">
<h3>当前目录:<span>{{requestPath}}</span></h3>
{{#if showFileList}}
<ul class="directory">
{{#each fileList}}
<li>
<p>
{{#if isDirectory }}
<span>「目录」</span>
{{else}}
<span>「文件」</span>
{{/if}}
<a href='{{link}}'>{{name}}</a>
</p>
</li>
{{/each}}
</ul>
{{else}}
{{htmlStr}}
{{/if}}
</div>
<div class="footer">
<span>Github地址: <a target="_blank" href="https://github.com/WisestCoder/static-server">https://github.com/WisestCoder/static-server</a></span>
<span class="bold">By <a target="_blank" href="https://github.com/WisestCoder">WisestCoder</a></span>
</div>
</body>
</html>
`;

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,7 @@
const page_dafault = require('./default');
const page_404 = require('./404');
module.exports = {
page_dafault,
page_404
};

View File

@@ -0,0 +1 @@
server -p 8081 -cors

3
Tools/FileServer/start.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
server -p 8081 -cors

View File

@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/modules.xml
/projectSettingsUpdater.xml
/.idea.SourceGenerator.iml
/contentModel.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1 @@
SourceGenerator

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,568 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.FlowAnalysis;
using Exception = System.Exception;
namespace Analyzer
{
public static class AnalyzerHelper
{
/// <summary>
/// 获取语法树节点的子节点中第一个指定类型节点
/// </summary>
/// <param name="syntaxNode">语法树节点</param>
/// <typeparam name="T">指定语法节点类型</typeparam>
/// <returns>第一个指定类型节点</returns>
public static T? GetFirstChild<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
{
foreach (SyntaxNode? childNode in syntaxNode.ChildNodes())
{
if (childNode.GetType() == typeof(T))
{
return childNode as T;
}
}
return null;
}
public static SyntaxNode? GetFirstChild(this SyntaxNode syntaxNode)
{
var childNodes = syntaxNode.ChildNodes();
if (childNodes.Count() > 0)
{
return childNodes.First();
}
return null;
}
/// <summary>
/// 获取语法树节点的子节点中最后一个指定类型节点
/// </summary>
/// <param name="syntaxNode">语法树节点</param>
/// <typeparam name="T">指定语法节点类型</typeparam>
/// <returns>最后一个指定类型节点</returns>
public static T? GetLastChild<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
{
foreach (SyntaxNode? childNode in syntaxNode.ChildNodes().Reverse())
{
if (childNode.GetType() == typeof(T))
{
return childNode as T;
}
}
return null;
}
/// <summary>
/// 获取语法节点所属的ClassDeclarationSyntax
/// </summary>
public static ClassDeclarationSyntax? GetParentClassDeclaration(this SyntaxNode syntaxNode)
{
SyntaxNode? parentNode = syntaxNode.Parent;
while (parentNode != null)
{
if (parentNode is ClassDeclarationSyntax classDeclarationSyntax)
{
return classDeclarationSyntax;
}
parentNode = parentNode.Parent;
}
return null;
}
/// <summary>
/// INamedTypeSymbol 是否有指定的Attribute
/// </summary>
public static bool HasAttribute(this ITypeSymbol typeSymbol, string AttributeName)
{
foreach (AttributeData? attributeData in typeSymbol.GetAttributes())
{
if (attributeData.AttributeClass?.ToString() == AttributeName)
{
return true;
}
}
return false;
}
public static bool HasAttributeInTypeAndBaseTyes(this ITypeSymbol typeSymbol, string AttributeName)
{
if (typeSymbol.HasAttribute(AttributeName))
{
return true;
}
foreach (var baseType in typeSymbol.BaseTypes())
{
if (baseType.HasAttribute(AttributeName))
{
return true;
}
}
return false;
}
public static IEnumerable<ITypeSymbol> BaseTypes(this ITypeSymbol typeSymbol)
{
ITypeSymbol? baseType = typeSymbol.BaseType;
while (baseType != null)
{
yield return baseType;
baseType = baseType.BaseType;
}
}
/// <summary>
/// INamedTypeSymbol 是否有指定的基类Attribute
/// </summary>
public static bool HasBaseAttribute(this INamedTypeSymbol namedTypeSymbol, string AttributeName)
{
foreach (AttributeData? attributeData in namedTypeSymbol.GetAttributes())
{
INamedTypeSymbol? attributeType = attributeData.AttributeClass?.BaseType;
while (attributeType != null)
{
if (attributeType.ToString() == AttributeName)
{
return true;
}
attributeType = attributeType.BaseType;
}
}
return false;
}
/// <summary>
/// INamedTypeSymbol 获取指定类型的第一个Attribute
/// </summary>
public static AttributeData? GetFirstAttribute(this INamedTypeSymbol namedTypeSymbol, string AttributeName)
{
foreach (AttributeData? attributeData in namedTypeSymbol.GetAttributes())
{
if (attributeData.AttributeClass?.ToString() == AttributeName)
{
return attributeData;
}
}
return null;
}
/// <summary>
/// INamedTypeSymbol 是否含有指定接口
/// </summary>
public static bool HasInterface(this INamedTypeSymbol namedTypeSymbol, string InterfaceName)
{
foreach (INamedTypeSymbol? iInterface in namedTypeSymbol.AllInterfaces)
{
if (iInterface.IsInterface(InterfaceName))
{
return true;
}
}
return false;
}
/// <summary>
/// 某个接口symbol 是否是指定的接口
/// </summary>
public static bool IsInterface(this INamedTypeSymbol namedTypeSymbol, string InterfaceName)
{
return $"{namedTypeSymbol.GetNameSpace()}.{namedTypeSymbol.Name}" == InterfaceName;
}
/// <summary>
/// 判断指定的程序集是否需要分析
/// </summary>
public static bool IsAssemblyNeedAnalyze(string? assemblyName, params string[] analyzeAssemblyNames)
{
if (assemblyName == null)
{
return false;
}
foreach (string analyzeAssemblyName in analyzeAssemblyNames)
{
if (assemblyName == analyzeAssemblyName)
{
return true;
}
}
return false;
}
/// <summary>
/// 获取 成员访问语法节点的父级类型
/// </summary>
public static ITypeSymbol? GetMemberAccessSyntaxParentType(this MemberAccessExpressionSyntax memberAccessExpressionSyntax,
SemanticModel semanticModel)
{
SyntaxNode? firstChildSyntaxNode = memberAccessExpressionSyntax.GetFirstChild();
if (firstChildSyntaxNode == null)
{
return null;
}
ISymbol? firstChildSymbol = semanticModel.GetSymbolInfo(firstChildSyntaxNode).Symbol;
if (firstChildSymbol == null)
{
return null;
}
if (firstChildSymbol is ILocalSymbol localSymbol)
{
return localSymbol.Type;
}
if (firstChildSymbol is IParameterSymbol parameterSymbol)
{
return parameterSymbol.Type;
}
if (firstChildSymbol is IPropertySymbol propertySymbol)
{
return propertySymbol.Type;
}
if (firstChildSymbol is IMethodSymbol methodSymbol)
{
return methodSymbol.ReturnType;
}
if (firstChildSymbol is IFieldSymbol fieldSymbol)
{
return fieldSymbol.Type;
}
if (firstChildSymbol is IEventSymbol eventSymbol)
{
return eventSymbol.Type;
}
return null;
}
/// <summary>
/// 获取最近的指定类型祖先节点
/// </summary>
public static T? GetNeareastAncestor<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
{
foreach (var ancestorNode in syntaxNode.Ancestors())
{
if (ancestorNode is T Tancestor)
{
return Tancestor;
}
}
return null;
}
/// <summary>
/// 判断函数是否是否含有指定类型的参数
/// </summary>
public static bool HasParameterType(this IMethodSymbol methodSymbol, string parameterType, out IParameterSymbol? cencelTokenSymbol)
{
foreach (var parameterSymbol in methodSymbol.Parameters)
{
if (parameterSymbol.Type.ToString() == parameterType)
{
cencelTokenSymbol = parameterSymbol;
return true;
}
}
cencelTokenSymbol = null;
return false;
}
/// <summary>
/// 获取所有指定类型的子节点
/// </summary>
public static IEnumerable<T> DescendantNodes<T>(this SyntaxNode syntaxNode) where T : SyntaxNode
{
foreach (var descendantNode in syntaxNode.DescendantNodes())
{
if (descendantNode is T node)
{
yield return node;
}
}
}
/// <summary>
/// 获取与该语法节点同层级的上一个节点
/// </summary>
public static SyntaxNode? PreviousNode(this SyntaxNode syntaxNode)
{
if (syntaxNode.Parent == null)
{
return null;
}
int index = 0;
foreach (var childNode in syntaxNode.Parent.ChildNodes())
{
if (childNode == syntaxNode)
{
break;
}
index++;
}
if (index == 0)
{
return null;
}
return syntaxNode.Parent.ChildNodes().ElementAt(index - 1);
}
/// <summary>
/// 获取与该语法节点同层级的下一个节点
/// </summary>
public static SyntaxNode? NextNode(this SyntaxNode syntaxNode)
{
if (syntaxNode.Parent == null)
{
return null;
}
int index = 0;
foreach (var childNode in syntaxNode.Parent.ChildNodes())
{
if (childNode == syntaxNode)
{
break;
}
index++;
}
if (index == syntaxNode.Parent.ChildNodes().Count() - 1)
{
return null;
}
return syntaxNode.Parent.ChildNodes().ElementAt(index + 1);
}
/// <summary>
/// 获取await表达式所在的控制流block
/// </summary>
public static BasicBlock? GetAwaitStatementControlFlowBlock(StatementSyntax statementSyntax, AwaitExpressionSyntax awaitExpressionSyntax, SemanticModel semanticModel)
{
// 跳过 return 表达式
if (statementSyntax.IsKind(SyntaxKind.ReturnStatement))
{
return null;
}
var methodSyntax = statementSyntax.GetNeareastAncestor<MethodDeclarationSyntax>();
if (methodSyntax == null)
{
return null;
}
// 构建表达式所在函数的控制流图
var controlFlowGraph = ControlFlowGraph.Create(methodSyntax, semanticModel);
if (controlFlowGraph == null)
{
return null;
}
if (statementSyntax is LocalDeclarationStatementSyntax)
{
return null;
}
BasicBlock? block = controlFlowGraph.Blocks.FirstOrDefault(x => x.Operations.Any(y => y.Syntax.Contains(statementSyntax)));
return block;
}
/// <summary>
/// 判断类是否为partial类
/// </summary>
public static bool IsPartial(this ClassDeclarationSyntax classDeclaration)
{
foreach (var modifier in classDeclaration.Modifiers)
{
if (modifier.IsKind(SyntaxKind.PartialKeyword))
{
return true;
}
}
return false;
}
public static string? GetNameSpace(this INamedTypeSymbol namedTypeSymbol)
{
INamespaceSymbol? namespaceSymbol = namedTypeSymbol.ContainingNamespace;
string? namespaceName = namespaceSymbol?.Name;
while (namespaceSymbol?.ContainingNamespace != null)
{
namespaceSymbol = namespaceSymbol.ContainingNamespace;
if (string.IsNullOrEmpty(namespaceSymbol.Name))
{
break;
}
namespaceName = $"{namespaceSymbol.Name}.{namespaceName}";
}
if (string.IsNullOrEmpty(namespaceName))
{
return null;
}
return namespaceName;
}
/// <summary>
/// 根据语义模型的文件路径 判断是否需要分析
/// </summary>
public static bool IsSemanticModelNeedAnalyze(SemanticModel semanticModel, params string[] filePaths)
{
foreach (var filePath in filePaths)
{
if (semanticModel.SyntaxTree.FilePath.Contains(filePath))
{
return true;
}
}
return false;
}
/// <summary>
/// 类型symbol是否有指定名字 指定参数的方法
/// </summary>
public static bool HasMethodWithParams(this INamedTypeSymbol namedTypeSymbol, string methodName, params ITypeSymbol[] typeSymbols)
{
foreach (var member in namedTypeSymbol.GetMembers())
{
if (member is not IMethodSymbol methodSymbol)
{
continue;
}
if (methodSymbol.Name != methodName)
{
continue;
}
if (typeSymbols.Length != methodSymbol.Parameters.Length)
{
continue;
}
if (typeSymbols.Length == 0)
{
return true;
}
bool isEqual = true;
for (int i = 0; i < typeSymbols.Length; i++)
{
if (typeSymbols[i].ToString() != methodSymbol.Parameters[i].Type.ToString())
{
isEqual = false;
break;
}
}
if (isEqual)
{
return true;
}
}
return false;
}
/// <summary>
/// 类型symbol是否有指定名字 指定参数的方法
/// </summary>
public static bool HasMethodWithParams(this INamedTypeSymbol namedTypeSymbol, string methodName, params string[] typeSymbols)
{
foreach (var member in namedTypeSymbol.GetMembers())
{
if (member is not IMethodSymbol methodSymbol)
{
continue;
}
if (methodSymbol.Name != methodName)
{
continue;
}
if (typeSymbols.Length != methodSymbol.Parameters.Length)
{
continue;
}
if (typeSymbols.Length == 0)
{
return true;
}
bool isEqual = true;
for (int i = 0; i < typeSymbols.Length; i++)
{
if (typeSymbols[i] != methodSymbol.Parameters[i].Type.ToString())
{
isEqual = false;
break;
}
}
if (isEqual)
{
return true;
}
}
return false;
}
/// <summary>
/// 方法symbol 是否有指定的attribute
/// </summary>
public static bool HasAttribute(this IMethodSymbol methodSymbol, string AttributeName)
{
foreach (AttributeData? attributeData in methodSymbol.GetAttributes())
{
if (attributeData?.AttributeClass?.ToString() == AttributeName)
{
return true;
}
}
return false;
}
}
}

View File

@@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SourceGenerator", "SourceGenerator\SourceGenerator.csproj", "{26B3F75F-AB7F-48F8-B234-F5A26E8CA319}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{57F17CC8-F26D-496E-B8E9-2601F9FF3CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57F17CC8-F26D-496E-B8E9-2601F9FF3CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57F17CC8-F26D-496E-B8E9-2601F9FF3CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57F17CC8-F26D-496E-B8E9-2601F9FF3CE5}.Release|Any CPU.Build.0 = Release|Any CPU
{26B3F75F-AB7F-48F8-B234-F5A26E8CA319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26B3F75F-AB7F-48F8-B234-F5A26E8CA319}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26B3F75F-AB7F-48F8-B234-F5A26E8CA319}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26B3F75F-AB7F-48F8-B234-F5A26E8CA319}.Release|Any CPU.Build.0 = Release|Any CPU
{F02E4A8C-07E7-4C7F-B30A-3D5BE1C7CB98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F02E4A8C-07E7-4C7F-B30A-3D5BE1C7CB98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F02E4A8C-07E7-4C7F-B30A-3D5BE1C7CB98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F02E4A8C-07E7-4C7F-B30A-3D5BE1C7CB98}.Release|Any CPU.Build.0 = Release|Any CPU
{23425ADC-1091-46A0-94BF-8EA6A7F5EFD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23425ADC-1091-46A0-94BF-8EA6A7F5EFD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23425ADC-1091-46A0-94BF-8EA6A7F5EFD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23425ADC-1091-46A0-94BF-8EA6A7F5EFD7}.Release|Any CPU.Build.0 = Release|Any CPU
{CA734AB9-F825-4DDA-BCB1-AD5FC464CAB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA734AB9-F825-4DDA-BCB1-AD5FC464CAB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA734AB9-F825-4DDA-BCB1-AD5FC464CAB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA734AB9-F825-4DDA-BCB1-AD5FC464CAB0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FCBB04E4-2793-4CF8-9278-E932D3B254AC}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,7 @@
public class Definition
{
public const string FrameworkNameSpace = "TEngine";
public const string NameSpace = "GameLogic";
public const string EventInterface = "EventInterface";
public const string StringToHash = "RuntimeId.ToRuntimeId";
}

View File

@@ -0,0 +1,192 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Analyzer;
[Generator]
public class EventInterfaceGenerator : ISourceGenerator
{
public void Initialize(GeneratorInitializationContext context)
{
// 可以在这里进行初始化
}
public void Execute(GeneratorExecutionContext context)
{
// 获取当前语法树
var syntaxTrees = context.Compilation.SyntaxTrees;
List<string> classNameList = new List<string>();
foreach (var tree in syntaxTrees)
{
var root = tree.GetRoot();
var interfaces = root.DescendantNodes()
.OfType<InterfaceDeclarationSyntax>()
.Where(i => i.AttributeLists.Count > 0 &&
i.AttributeLists
.Any(a => a.Attributes
.Any(attr => attr.Name.ToString() == $"{Definition.EventInterface}")));
foreach (var interfaceNode in interfaces)
{
var interfaceName = interfaceNode.Identifier.ToString();
var fullName = interfaceNode.SyntaxTree.GetRoot()
.DescendantNodes()
.OfType<NamespaceDeclarationSyntax>()
.Select(ns => ns.Name.ToString())
.Concat(new[] { interfaceName })
.Aggregate((a, b) => a + "." + b);
var eventClassName = $"{interfaceName}_Event";
var eventClassCode = GenerateEventClass(interfaceName, eventClassName, interfaceNode);
context.AddSource($"{eventClassName}.g.cs", eventClassCode);
// 生成实现类
var implementationClassCode = GenerateImplementationClass(fullName, interfaceName, interfaceNode,context);
context.AddSource($"{interfaceName}_Gen.g.cs", implementationClassCode);
classNameList.Add($"{interfaceName}_Gen");
}
}
string uniqueFileName = $"GameEventHelper.g.cs";
context.AddSource(uniqueFileName, GenerateGameEventHelper(classNameList));
}
private string GenerateGameEventHelper(List<string> classNameList)
{
var sb = new StringBuilder();
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine($"// <auto-generated>");
sb.AppendLine($"// This code was generated by autoBindTool.");
sb.AppendLine($"// Changes to this file may cause incorrect behavior and will be lost if");
sb.AppendLine($"// the code is regenerated.");
sb.AppendLine($"// </auto-generated>");
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine();
sb.AppendLine($"using UnityEngine;");
sb.AppendLine($"using UnityEngine.UI;");
sb.AppendLine($"using {Definition.FrameworkNameSpace};");
sb.AppendLine();
sb.AppendLine($"namespace {Definition.NameSpace}");
sb.AppendLine($"{{");
sb.AppendLine($" public static class GameEventHelper");
sb.AppendLine(" {");
sb.AppendLine($" public static void Init()");
sb.AppendLine(" {");
foreach (var className in classNameList)
{
sb.AppendLine($" var m_{className} = new {className}(GameEvent.EventMgr.GetDispatcher());");
}
sb.AppendLine(" }");
sb.AppendLine(" }");
sb.AppendLine("}");
return sb.ToString();
}
private string GenerateEventClass(string interfaceName, string className, InterfaceDeclarationSyntax interfaceNode)
{
var methods = interfaceNode.Members.OfType<MethodDeclarationSyntax>();
var sb = new StringBuilder();
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine($"// <auto-generated>");
sb.AppendLine($"// This code was generated by autoBindTool.");
sb.AppendLine($"// Changes to this file may cause incorrect behavior and will be lost if");
sb.AppendLine($"// the code is regenerated.");
sb.AppendLine($"// </auto-generated>");
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine();
sb.AppendLine($"using UnityEngine;");
sb.AppendLine($"using UnityEngine.UI;");
sb.AppendLine($"using {Definition.FrameworkNameSpace};");
sb.AppendLine();
sb.AppendLine($"namespace {Definition.NameSpace}");
sb.AppendLine("{");
sb.AppendLine($" public partial class {className}");
sb.AppendLine(" {");
foreach (var method in methods)
{
var methodName = method.Identifier.ToString();
var parameters = string.Join(", ", method.ParameterList.Parameters.Select(p => $"{p.Type} {p.Identifier}"));
sb.AppendLine($" public static readonly int {methodName} = {Definition.StringToHash}(\"{className}.{methodName}\");");
}
sb.AppendLine(" }");
sb.AppendLine("}");
return sb.ToString();
}
private string GenerateImplementationClass(string interfaceFullName, string interfaceName, InterfaceDeclarationSyntax interfaceNode,GeneratorExecutionContext context)
{
var semanticModel = context.Compilation.GetSemanticModel(interfaceNode.SyntaxTree);
var sb = new StringBuilder();
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine($"// <auto-generated>");
sb.AppendLine($"// This code was generated by autoBindTool.");
sb.AppendLine($"// Changes to this file may cause incorrect behavior and will be lost if");
sb.AppendLine($"// the code is regenerated.");
sb.AppendLine($"// </auto-generated>");
sb.AppendLine($"//------------------------------------------------------------------------------");
sb.AppendLine();
sb.AppendLine($"using UnityEngine;");
sb.AppendLine($"using UnityEngine.UI;");
sb.AppendLine($"using {Definition.FrameworkNameSpace};");
sb.AppendLine();
sb.AppendLine($"namespace {Definition.NameSpace}");
sb.AppendLine($"{{");
sb.AppendLine($" public partial class {interfaceName}_Gen : {interfaceName}");
sb.AppendLine(" {");
sb.AppendLine(" private EventDispatcher _dispatcher;");
sb.AppendLine($" public {interfaceName}_Gen(EventDispatcher dispatcher)");
sb.AppendLine(" {");
sb.AppendLine(" _dispatcher = dispatcher;");
sb.AppendLine($" GameEvent.EventMgr.RegWrapInterface(\"{interfaceFullName}\", this);");
sb.AppendLine(" }");
foreach (var method in interfaceNode.Members.OfType<MethodDeclarationSyntax>())
{
var methodName = method.Identifier.ToString();
var parameters = GenerateParameters(method, semanticModel);
sb.AppendLine($" public void {methodName}({parameters})");
sb.AppendLine(" {");
if (method.ParameterList.Parameters.Count > 0)
{
var paramNames = string.Join(", ", method.ParameterList.Parameters.Select(p => p.Identifier.ToString()));
sb.AppendLine($" _dispatcher.Send({interfaceName}_Event.{methodName}, {paramNames});");
}
else
{
sb.AppendLine($" _dispatcher.Send({interfaceName}_Event.{methodName});");
}
sb.AppendLine(" }");
}
sb.AppendLine(" }");
sb.AppendLine("}");
return sb.ToString();
}
private string GenerateParameters(MethodDeclarationSyntax method, SemanticModel semanticModel)
{
return string.Join(", ", method.ParameterList.Parameters.Select(p =>
{
var typeSymbol = semanticModel.GetTypeInfo(p.Type).Type;
return typeSymbol != null
? $"{typeSymbol.ToDisplayString()} {p.Identifier}"
: $"{p.Type} {p.Identifier}";
}));
}
}

View File

@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
<IncludeBuildOutput>false</IncludeBuildOutput>
<DevelopmentDependency>true</DevelopmentDependency>
<IncludeSymbols>false</IncludeSymbols>
<NoWarn>1701;1702;RS2008</NoWarn>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
<ItemGroup>
<Compile Include="../Analyzer/Extension/*.cs">
<Link>Extension\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- <Target Name="PostBuild" AfterTargets="PostBuildEvent">-->
<!-- <Copy SourceFiles="$(TargetDir)/$(TargetName).dll" DestinationFolder="$(ProjectDir)/../../Unity/Assets/Plugins/" ContinueOnError="false" />-->
<!-- </Target>-->
</Project>

View File

@@ -0,0 +1,236 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.0/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"SourceGenerator/1.0.0": {
"dependencies": {
"Microsoft.CodeAnalysis.Analyzers": "3.3.3",
"Microsoft.CodeAnalysis.CSharp": "3.9.0",
"NETStandard.Library": "2.0.3"
},
"runtime": {
"SourceGenerator.dll": {}
}
},
"Microsoft.CodeAnalysis.Analyzers/3.3.3": {},
"Microsoft.CodeAnalysis.Common/3.9.0": {
"dependencies": {
"Microsoft.CodeAnalysis.Analyzers": "3.3.3",
"System.Collections.Immutable": "5.0.0",
"System.Memory": "4.5.4",
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encoding.CodePages": "4.5.1",
"System.Threading.Tasks.Extensions": "4.5.4"
},
"runtime": {
"lib/netstandard2.0/Microsoft.CodeAnalysis.dll": {
"assemblyVersion": "3.9.0.0",
"fileVersion": "3.900.21.12420"
}
}
},
"Microsoft.CodeAnalysis.CSharp/3.9.0": {
"dependencies": {
"Microsoft.CodeAnalysis.Common": "3.9.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.dll": {
"assemblyVersion": "3.9.0.0",
"fileVersion": "3.900.21.12420"
}
}
},
"Microsoft.NETCore.Platforms/1.1.0": {},
"NETStandard.Library/2.0.3": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"System.Buffers/4.5.1": {
"runtime": {
"lib/netstandard2.0/System.Buffers.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.6.28619.1"
}
}
},
"System.Collections.Immutable/5.0.0": {
"dependencies": {
"System.Memory": "4.5.4"
},
"runtime": {
"lib/netstandard2.0/System.Collections.Immutable.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"System.Memory/4.5.4": {
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Memory.dll": {
"assemblyVersion": "4.0.1.1",
"fileVersion": "4.6.28619.1"
}
}
},
"System.Numerics.Vectors/4.4.0": {
"runtime": {
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.6.25519.3"
}
}
},
"System.Reflection.Metadata/5.0.0": {
"dependencies": {
"System.Collections.Immutable": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
"runtime": {
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"System.Text.Encoding.CodePages/4.5.1": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Text.Encoding.CodePages.dll": {
"assemblyVersion": "4.1.1.0",
"fileVersion": "4.6.27129.4"
}
}
},
"System.Threading.Tasks.Extensions/4.5.4": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Threading.Tasks.Extensions.dll": {
"assemblyVersion": "4.2.0.1",
"fileVersion": "4.6.28619.1"
}
}
}
}
},
"libraries": {
"SourceGenerator/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.CodeAnalysis.Analyzers/3.3.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ==",
"path": "microsoft.codeanalysis.analyzers/3.3.3",
"hashPath": "microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512"
},
"Microsoft.CodeAnalysis.Common/3.9.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HiWjF7PNIEngmFg2Xk8cZ/83lRIRkk9v+5ibbY5B7VvjNGdClGAMuWtZER9F5rGRR41VbJLco9ah73jFTh4vPw==",
"path": "microsoft.codeanalysis.common/3.9.0",
"hashPath": "microsoft.codeanalysis.common.3.9.0.nupkg.sha512"
},
"Microsoft.CodeAnalysis.CSharp/3.9.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NTsiK3fnoZGemy4dBHrILwg9rL+jDnOJ7aixFu4EOWM1r6MZMrNCIhT2tO4AmIMdfICLPwj910uZRRLpbMnqHg==",
"path": "microsoft.codeanalysis.csharp/3.9.0",
"hashPath": "microsoft.codeanalysis.csharp.3.9.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"NETStandard.Library/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Collections.Immutable/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"path": "system.collections.immutable/5.0.0",
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
},
"System.Memory/4.5.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
"path": "system.memory/4.5.4",
"hashPath": "system.memory.4.5.4.nupkg.sha512"
},
"System.Numerics.Vectors/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==",
"path": "system.numerics.vectors/4.4.0",
"hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512"
},
"System.Reflection.Metadata/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"path": "system.reflection.metadata/5.0.0",
"hashPath": "system.reflection.metadata.5.0.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
"path": "system.runtime.compilerservices.unsafe/5.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==",
"path": "system.text.encoding.codepages/4.5.1",
"hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512"
},
"System.Threading.Tasks.Extensions/4.5.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"path": "system.threading.tasks.extensions/4.5.4",
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b7d75c0f6f518a5f2ca0ed9304411302709f8dbe")]
[assembly: System.Reflection.AssemblyProductAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyTitleAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
1f4b8d9919850399efa15c732e9aadbc83f7ae6889745a83831d20da225de402

View File

@@ -0,0 +1,12 @@
is_global = true
build_property.TargetFramework = netstandard2.0
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = SourceGenerator
build_property.ProjectDir = E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1 @@
ff752c9a870df6aafb4669266bbcfd2f80f90bfd76a1bae882d02d67457c3ec4

View File

@@ -0,0 +1,32 @@
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.deps.json
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.dll
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.pdb
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.AssemblyReference.cache
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.GeneratedMSBuildEditorConfig.editorconfig
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfoInputs.cache
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfo.cs
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.CoreCompileInputs.cache
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.sourcelink.json
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.dll
G:\github\TEngine\Tools\SourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.pdb
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.AssemblyReference.cache
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfoInputs.cache
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfo.cs
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.CoreCompileInputs.cache
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.dll
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.pdb
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.deps.json
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.dll
C:\Users\Admin\Downloads\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.pdb
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.deps.json
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.dll
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\bin\Debug\SourceGenerator.pdb
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.AssemblyReference.cache
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.GeneratedMSBuildEditorConfig.editorconfig
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfoInputs.cache
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.AssemblyInfo.cs
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.csproj.CoreCompileInputs.cache
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.sourcelink.json
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.dll
E:\WorkSpace\ZGame\Tools\GameEventSourceGenerator\SourceGenerator\obj\Debug\SourceGenerator.pdb

View File

@@ -0,0 +1 @@
{"documents":{"E:\\WorkSpace\\ZGame\\*":"https://raw.githubusercontent.com/Alex-Rachel/ZGame/b7d75c0f6f518a5f2ca0ed9304411302709f8dbe/*"}}

View File

@@ -0,0 +1,82 @@
{
"format": 1,
"restore": {
"E:\\WorkSpace\\ZGame\\Tools\\GameEventSourceGenerator\\SourceGenerator\\SourceGenerator.csproj": {}
},
"projects": {
"E:\\WorkSpace\\ZGame\\Tools\\GameEventSourceGenerator\\SourceGenerator\\SourceGenerator.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\WorkSpace\\ZGame\\Tools\\GameEventSourceGenerator\\SourceGenerator\\SourceGenerator.csproj",
"projectName": "SourceGenerator",
"projectPath": "E:\\WorkSpace\\ZGame\\Tools\\GameEventSourceGenerator\\SourceGenerator\\SourceGenerator.csproj",
"packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "E:\\WorkSpace\\ZGame\\Tools\\GameEventSourceGenerator\\SourceGenerator\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
}
},
"frameworks": {
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"dependencies": {
"Microsoft.CodeAnalysis.Analyzers": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
"suppressParent": "All",
"target": "Package",
"version": "[3.3.3, )"
},
"Microsoft.CodeAnalysis.CSharp": {
"suppressParent": "All",
"target": "Package",
"version": "[3.9.0, )"
},
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.300\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Admin\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.2</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Admin\.nuget\packages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.codeanalysis.analyzers\3.3.3\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('$(NuGetPackageRoot)microsoft.codeanalysis.analyzers\3.3.3\build\Microsoft.CodeAnalysis.Analyzers.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\Admin\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.3</PkgMicrosoft_CodeAnalysis_Analyzers>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.codeanalysis.analyzers\3.3.3\build\Microsoft.CodeAnalysis.Analyzers.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.codeanalysis.analyzers\3.3.3\build\Microsoft.CodeAnalysis.Analyzers.targets')" />
</ImportGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More