diff --git a/Configs/GameConfig/CustomTemplate/ExternalTypeUtil.cs b/Configs/GameConfig/CustomTemplate/ExternalTypeUtil.cs new file mode 100644 index 00000000..f91d9e8a --- /dev/null +++ b/Configs/GameConfig/CustomTemplate/ExternalTypeUtil.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +public static class ExternalTypeUtil +{ + public static Vector2 NewVector2(cfg.vector2 v) + { + return new Vector2(v.X, v.Y); + } + + public static Vector3 NewVector3(cfg.vector3 v) + { + return new Vector3(v.X, v.Y, v.Z); + } + + public static Vector4 NewVector4(cfg.vector4 v) + { + return new Vector4(v.X, v.Y, v.Z, v.W); + } + + public static Vector2Int NewVector2Int(cfg.vector2int v) + { + return new Vector2Int(v.X, v.Y); + } + + public static Vector3Int NewVector3Int(cfg.vector3int v) + { + return new Vector3Int(v.X, v.Y, v.Z); + } +} \ No newline at end of file diff --git a/Configs/GameConfig/Defines/builtin.xml b/Configs/GameConfig/Defines/builtin.xml index e535ff48..87a7071f 100644 --- a/Configs/GameConfig/Defines/builtin.xml +++ b/Configs/GameConfig/Defines/builtin.xml @@ -1,17 +1,46 @@ - - + + + + - - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Configs/GameConfig/gen_code_bin_to_project.bat b/Configs/GameConfig/gen_code_bin_to_project.bat index aaccdbdd..a6f8c52d 100644 --- a/Configs/GameConfig/gen_code_bin_to_project.bat +++ b/Configs/GameConfig/gen_code_bin_to_project.bat @@ -8,12 +8,14 @@ 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 diff --git a/Configs/GameConfig/gen_code_bin_to_project.sh b/Configs/GameConfig/gen_code_bin_to_project.sh index 59269d99..08936598 100644 --- a/Configs/GameConfig/gen_code_bin_to_project.sh +++ b/Configs/GameConfig/gen_code_bin_to_project.sh @@ -11,12 +11,15 @@ export CODE_OUTPATH="${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GamePro 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}" diff --git a/Configs/GameConfig/gen_code_bin_to_project_lazyload.bat b/Configs/GameConfig/gen_code_bin_to_project_lazyload.bat index c97c8377..d9722abd 100644 --- a/Configs/GameConfig/gen_code_bin_to_project_lazyload.bat +++ b/Configs/GameConfig/gen_code_bin_to_project_lazyload.bat @@ -8,6 +8,7 @@ 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 ^ @@ -15,6 +16,7 @@ dotnet %LUBAN_DLL% ^ -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 diff --git a/Configs/GameConfig/gen_code_bin_to_project_lazyload.sh b/Configs/GameConfig/gen_code_bin_to_project_lazyload.sh index 7324d765..7d354f99 100644 --- a/Configs/GameConfig/gen_code_bin_to_project_lazyload.sh +++ b/Configs/GameConfig/gen_code_bin_to_project_lazyload.sh @@ -11,6 +11,8 @@ export CODE_OUTPATH="${WORKSPACE}/UnityProject/Assets/GameScripts/HotFix/GamePro 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 \ @@ -18,6 +20,7 @@ dotnet "${LUBAN_DLL}" \ -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}" diff --git a/Configs/GameConfig/gen_code_bin_to_server.bat b/Configs/GameConfig/gen_code_bin_to_server.bat index 697220e7..adaf71a6 100644 --- a/Configs/GameConfig/gen_code_bin_to_server.bat +++ b/Configs/GameConfig/gen_code_bin_to_server.bat @@ -12,6 +12,7 @@ dotnet %LUBAN_DLL% ^ -c cs-bin ^ -d bin^ --conf %CONF_ROOT%\luban.conf ^ + -x code.lineEnding=crlf ^ -x outputCodeDir=%CODE_OUTPATH% ^ -x outputDataDir=%DATA_OUTPATH% pause diff --git a/Configs/GameConfig/gen_code_bin_to_server.sh b/Configs/GameConfig/gen_code_bin_to_server.sh index 4b257d38..12de6cbc 100644 --- a/Configs/GameConfig/gen_code_bin_to_server.sh +++ b/Configs/GameConfig/gen_code_bin_to_server.sh @@ -14,6 +14,7 @@ dotnet "${LUBAN_DLL}" \ -c cs-bin \ -d bin \ --conf "${CONF_ROOT}/luban.conf" \ + -x code.lineEnding=crlf \ -x outputCodeDir="${CODE_OUTPATH}" \ -x outputDataDir="${DATA_OUTPATH}" diff --git a/UnityProject/Assets/TEngine/Editor/AtlasMakerEditor/EditorSpriteSaveInfo.cs b/UnityProject/Assets/TEngine/Editor/AtlasMakerEditor/EditorSpriteSaveInfo.cs index b6265625..6b910275 100644 --- a/UnityProject/Assets/TEngine/Editor/AtlasMakerEditor/EditorSpriteSaveInfo.cs +++ b/UnityProject/Assets/TEngine/Editor/AtlasMakerEditor/EditorSpriteSaveInfo.cs @@ -88,9 +88,8 @@ public static void MarkParentAtlasesDirty(string assetPath) { - var currentPath = Path.GetDirectoryName(assetPath); + var currentPath = Path.GetDirectoryName(assetPath).Replace("\\", "/"); var rootPath = Config.sourceAtlasRoot.Replace("\\", "/").TrimEnd('/'); - currentPath = currentPath.Replace("\\", "/"); while (currentPath != null && currentPath.StartsWith(rootPath)) { var parentAtlasName = GetAtlasNameForDirectory(currentPath);