diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 55984a7c..776169ab 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -28,7 +28,7 @@ namespace WeChatWASM SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); // string templateHeader = (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package && UnityUtil.GetEngineVersion() >= UnityUtil.EngineVersion.Tuanjie) ? "PACKAGE:com.qq.wx.minigame:" : "PROJECT:"; string templateHeader = "PROJECT:"; -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME PlayerSettings.WeixinMiniGame.threadsSupport = false; PlayerSettings.runInBackground = false; PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled; @@ -177,7 +177,7 @@ namespace WeChatWASM public static void UpdateGraphicAPI() { GraphicsDeviceType[] targets = new GraphicsDeviceType[] { }; -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false); if (config.CompileOptions.Webgl2) { @@ -281,7 +281,7 @@ namespace WeChatWASM { text = RemoveFunctionsWithPrefix(text, prefix); } -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME if (PlayerSettings.WeixinMiniGame.exceptionSupport == WeixinMiniGameExceptionSupport.None) #else if (PlayerSettings.WebGL.exceptionSupport == WebGLExceptionSupport.None) @@ -354,7 +354,7 @@ namespace WeChatWASM private static int Build() { -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME PlayerSettings.WeixinMiniGame.emscriptenArgs = string.Empty; if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER")) { @@ -383,14 +383,14 @@ namespace WeChatWASM { UnityEngine.Debug.LogWarningFormat($"UnityHeap大于500M时,32位Android与iOS普通模式较大概率启动失败,中轻度游戏建议小于该值。请查看GIT文档优化Unity WebGL的内存"); } -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME PlayerSettings.WeixinMiniGame.emscriptenArgs += $" -s TOTAL_MEMORY={config.ProjectConf.MemorySize}MB"; #else PlayerSettings.WebGL.emscriptenArgs += $" -s TOTAL_MEMORY={config.ProjectConf.MemorySize}MB"; #endif } -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME if (config.CompileOptions.ProfilingMemory) { PlayerSettings.WeixinMiniGame.emscriptenArgs += " --memoryprofiler "; @@ -1201,7 +1201,7 @@ namespace WeChatWASM { var importer = AssetImporter.GetAtPath(jsLibs[i]) as PluginImporter; bool value = i == index; -#if WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, value); #else importer.SetCompatibleWithPlatform(BuildTarget.WebGL, value); diff --git a/Editor/WXEditorWindow.cs b/Editor/WXEditorWindow.cs index bed4a62c..0339f6c9 100644 --- a/Editor/WXEditorWindow.cs +++ b/Editor/WXEditorWindow.cs @@ -255,7 +255,7 @@ namespace WeChatWASM ShowNotification(new GUIContent("转换完成")); else { -#if (UNITY_WEBGL || WEIXINMINIGAME) && UNITY_INSTANTGAME +#if (UNITY_WEBGL || PLATFORM_WEIXINMINIGAME) && UNITY_INSTANTGAME // 上传首包资源 if (!string.IsNullOrEmpty(WXConvertCore.FirstBundlePath) && File.Exists(WXConvertCore.FirstBundlePath)) { diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 3a17fe1b..063a5cc4 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ { public class WXPluginVersion { - public static string pluginVersion = "202403051510"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202403061052"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 537b6bc0..37dcd5f3 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Runtime/HideLoadingPage.cs b/Runtime/HideLoadingPage.cs index d6d4b0b6..72f743d4 100644 --- a/Runtime/HideLoadingPage.cs +++ b/Runtime/HideLoadingPage.cs @@ -1,4 +1,4 @@ -#if UNITY_WEBGL|| WEIXINMINIGAME || UNITY_EDITOR +#if UNITY_WEBGL || WEIXINMINIGAME || UNITY_EDITOR using System; using UnityEngine; using WeChatWASM; @@ -12,7 +12,7 @@ internal class CheckFrame : MonoBehaviour frameCnt++; if (frameCnt == 2) { -#if (UNITY_WEBGL|| WEIXINMINIGAME) && !UNITY_EDITOR +#if (UNITY_WEBGL || WEIXINMINIGAME) && !UNITY_EDITOR WXSDKManagerHandler.Instance.HideLoadingPage(); #endif Destroy(this); diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index ad8e2aea..935cd361 100644 Binary files a/Runtime/Plugins/wx-runtime-editor.dll and b/Runtime/Plugins/wx-runtime-editor.dll differ diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index 0beb1d74..5129b9bb 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/package.json b/package.json index 66abb38f..cd8aa398 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.1","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} +{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.2","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}