Skip to content

Commit 87d21fc

Browse files
author
nebulaliu
committed
Auto-publish WXSDK.
1 parent 940d8b6 commit 87d21fc

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

Editor/WXConvertCore.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void Init()
2828
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js");
2929
// string templateHeader = (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package && UnityUtil.GetEngineVersion() >= UnityUtil.EngineVersion.Tuanjie) ? "PACKAGE:com.qq.wx.minigame:" : "PROJECT:";
3030
string templateHeader = "PROJECT:";
31-
#if WEIXINMINIGAME
31+
#if PLATFORM_WEIXINMINIGAME
3232
PlayerSettings.WeixinMiniGame.threadsSupport = false;
3333
PlayerSettings.runInBackground = false;
3434
PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled;
@@ -177,7 +177,7 @@ private static void CheckBuildTarget()
177177
public static void UpdateGraphicAPI()
178178
{
179179
GraphicsDeviceType[] targets = new GraphicsDeviceType[] { };
180-
#if WEIXINMINIGAME
180+
#if PLATFORM_WEIXINMINIGAME
181181
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false);
182182
if (config.CompileOptions.Webgl2)
183183
{
@@ -281,7 +281,7 @@ private static void ConvertCode()
281281
{
282282
text = RemoveFunctionsWithPrefix(text, prefix);
283283
}
284-
#if WEIXINMINIGAME
284+
#if PLATFORM_WEIXINMINIGAME
285285
if (PlayerSettings.WeixinMiniGame.exceptionSupport == WeixinMiniGameExceptionSupport.None)
286286
#else
287287
if (PlayerSettings.WebGL.exceptionSupport == WebGLExceptionSupport.None)
@@ -354,7 +354,7 @@ private static void ConvertCode()
354354

355355
private static int Build()
356356
{
357-
#if WEIXINMINIGAME
357+
#if PLATFORM_WEIXINMINIGAME
358358
PlayerSettings.WeixinMiniGame.emscriptenArgs = string.Empty;
359359
if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER"))
360360
{
@@ -383,14 +383,14 @@ private static int Build()
383383
{
384384
UnityEngine.Debug.LogWarningFormat($"UnityHeap大于500M时,32位Android与iOS普通模式较大概率启动失败,中轻度游戏建议小于该值。请查看GIT文档<a href=\"https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/blob/main/Design/OptimizationMemory.md\">优化Unity WebGL的内存</a>");
385385
}
386-
#if WEIXINMINIGAME
386+
#if PLATFORM_WEIXINMINIGAME
387387
PlayerSettings.WeixinMiniGame.emscriptenArgs += $" -s TOTAL_MEMORY={config.ProjectConf.MemorySize}MB";
388388
#else
389389
PlayerSettings.WebGL.emscriptenArgs += $" -s TOTAL_MEMORY={config.ProjectConf.MemorySize}MB";
390390
#endif
391391
}
392392

393-
#if WEIXINMINIGAME
393+
#if PLATFORM_WEIXINMINIGAME
394394
if (config.CompileOptions.ProfilingMemory)
395395
{
396396
PlayerSettings.WeixinMiniGame.emscriptenArgs += " --memoryprofiler ";
@@ -1201,7 +1201,7 @@ private static void SettingWXTextureMinJSLib()
12011201
{
12021202
var importer = AssetImporter.GetAtPath(jsLibs[i]) as PluginImporter;
12031203
bool value = i == index;
1204-
#if WEIXINMINIGAME
1204+
#if PLATFORM_WEIXINMINIGAME
12051205
importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, value);
12061206
#else
12071207
importer.SetCompatibleWithPlatform(BuildTarget.WebGL, value);

Editor/WXEditorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public void OnGUI()
255255
ShowNotification(new GUIContent("转换完成"));
256256
else
257257
{
258-
#if (UNITY_WEBGL || WEIXINMINIGAME) && UNITY_INSTANTGAME
258+
#if (UNITY_WEBGL || PLATFORM_WEIXINMINIGAME) && UNITY_INSTANTGAME
259259
// 上传首包资源
260260
if (!string.IsNullOrEmpty(WXConvertCore.FirstBundlePath) && File.Exists(WXConvertCore.FirstBundlePath))
261261
{

Editor/WXPluginVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class WXPluginVersion
44
{
5-
public static string pluginVersion = "202403051510"; // 这一行不要改他,导出的时候会自动替换
5+
public static string pluginVersion = "202403061052"; // 这一行不要改他,导出的时候会自动替换
66
}
77

88
public class WXPluginConf

Editor/wx-editor.dll

0 Bytes
Binary file not shown.

Runtime/HideLoadingPage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_WEBGL|| WEIXINMINIGAME || UNITY_EDITOR
1+
#if UNITY_WEBGL || WEIXINMINIGAME || UNITY_EDITOR
22
using System;
33
using UnityEngine;
44
using WeChatWASM;
@@ -12,7 +12,7 @@ public void Update()
1212
frameCnt++;
1313
if (frameCnt == 2)
1414
{
15-
#if (UNITY_WEBGL|| WEIXINMINIGAME) && !UNITY_EDITOR
15+
#if (UNITY_WEBGL || WEIXINMINIGAME) && !UNITY_EDITOR
1616
WXSDKManagerHandler.Instance.HideLoadingPage();
1717
#endif
1818
Destroy(this);
0 Bytes
Binary file not shown.

Runtime/Plugins/wx-runtime.dll

0 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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":{}}
1+
{"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":{}}

0 commit comments

Comments
 (0)