mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-12 19:25:55 +08:00
Auto-publish WXSDK.
This commit is contained in:
parent
fe8d29ef2f
commit
947e902e2c
@ -30,7 +30,15 @@ namespace WeChatWASM
|
|||||||
PlayerSettings.WeixinMiniGame.threadsSupport = false;
|
PlayerSettings.WeixinMiniGame.threadsSupport = false;
|
||||||
PlayerSettings.runInBackground = false;
|
PlayerSettings.runInBackground = false;
|
||||||
PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled;
|
PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled;
|
||||||
PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ";
|
if(UnityUtil.GetEngineVersion() == UnityUtil.EngineVersion.Tuanjie)
|
||||||
|
{
|
||||||
|
var absolutePath = Path.GetFullPath("Packages/com.qq.weixin.minigame/WebGLTemplates/WXTemplate2022TJ");
|
||||||
|
PlayerSettings.WeixinMiniGame.template = $"PATH:{absolutePath}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ";
|
||||||
|
}
|
||||||
PlayerSettings.WeixinMiniGame.linkerTarget = WeixinMiniGameLinkerTarget.Wasm;
|
PlayerSettings.WeixinMiniGame.linkerTarget = WeixinMiniGameLinkerTarget.Wasm;
|
||||||
PlayerSettings.WeixinMiniGame.dataCaching = false;
|
PlayerSettings.WeixinMiniGame.dataCaching = false;
|
||||||
PlayerSettings.WeixinMiniGame.debugSymbolMode = WeixinMiniGameDebugSymbolMode.External;
|
PlayerSettings.WeixinMiniGame.debugSymbolMode = WeixinMiniGameDebugSymbolMode.External;
|
||||||
@ -497,7 +505,7 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;";
|
|||||||
|
|
||||||
private static void ConvertCode()
|
private static void ConvertCode()
|
||||||
{
|
{
|
||||||
UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framewor. Dst: " + config.ProjectConf.DST);
|
UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framework. Dst: " + config.ProjectConf.DST);
|
||||||
|
|
||||||
UnityUtil.DelectDir(Path.Combine(config.ProjectConf.DST, miniGameDir));
|
UnityUtil.DelectDir(Path.Combine(config.ProjectConf.DST, miniGameDir));
|
||||||
string text = String.Empty;
|
string text = String.Empty;
|
||||||
@ -611,8 +619,11 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;";
|
|||||||
}
|
}
|
||||||
|
|
||||||
text = header + text;
|
text = header + text;
|
||||||
|
|
||||||
|
var targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, target);
|
||||||
if (!UseIL2CPP)
|
if (!UseIL2CPP)
|
||||||
{
|
{
|
||||||
|
targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, frameworkDir, target);
|
||||||
Rule[] nativeRules =
|
Rule[] nativeRules =
|
||||||
{
|
{
|
||||||
new Rule()
|
new Rule()
|
||||||
@ -654,7 +665,7 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllText(Path.Combine(config.ProjectConf.DST, miniGameDir, target), text, new UTF8Encoding(false));
|
File.WriteAllText(targetPath, text, new UTF8Encoding(false));
|
||||||
|
|
||||||
UnityEngine.Debug.LogFormat("[Converter] adapt framework done! ");
|
UnityEngine.Debug.LogFormat("[Converter] adapt framework done! ");
|
||||||
}
|
}
|
||||||
@ -1572,4 +1583,4 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,10 +21,6 @@ namespace WeChatWASM
|
|||||||
public WXSettingsHelper()
|
public WXSettingsHelper()
|
||||||
{
|
{
|
||||||
Type weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinPackageHelpers,UnityEditor");
|
Type weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinPackageHelpers,UnityEditor");
|
||||||
if (weixinMiniGamePackageHelpersType == null)
|
|
||||||
{
|
|
||||||
weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinMiniGamePackageHelpers,UnityEditor");
|
|
||||||
}
|
|
||||||
if (weixinMiniGamePackageHelpersType != null)
|
if (weixinMiniGamePackageHelpersType != null)
|
||||||
{
|
{
|
||||||
EventInfo onSettingsGUIEvent = weixinMiniGamePackageHelpersType.GetEvent("OnPackageSettingsGUI");
|
EventInfo onSettingsGUIEvent = weixinMiniGamePackageHelpersType.GetEvent("OnPackageSettingsGUI");
|
||||||
@ -77,6 +73,7 @@ namespace WeChatWASM
|
|||||||
public Texture tex;
|
public Texture tex;
|
||||||
public void OnSettingsGUI(EditorWindow window)
|
public void OnSettingsGUI(EditorWindow window)
|
||||||
{
|
{
|
||||||
|
PluginUpdateManager.CheckUpdateOnce();
|
||||||
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
|
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
|
||||||
|
|
||||||
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
|
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
|
||||||
|
|||||||
@ -14,8 +14,6 @@ namespace WeChatWASM
|
|||||||
win.minSize = new Vector2(350, 400);
|
win.minSize = new Vector2(350, 400);
|
||||||
win.position = new Rect(100, 100, 600, 700);
|
win.position = new Rect(100, 100, 600, 700);
|
||||||
win.Show();
|
win.Show();
|
||||||
// 打开面板时自动检查更新
|
|
||||||
PluginUpdateManager.CheckUpdte();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向前兼容,请使用 WXConvertCore.cs
|
// 向前兼容,请使用 WXConvertCore.cs
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class WXPluginVersion
|
public class WXPluginVersion
|
||||||
{
|
{
|
||||||
public static string pluginVersion = "202403281934"; // 这一行不要改他,导出的时候会自动替换
|
public static string pluginVersion = "202403291954"; // 这一行不要改他,导出的时候会自动替换
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WXPluginConf
|
public class WXPluginConf
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.5","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.6","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user