游戏app打包工具里 增加webGL打包菜单接口
This commit is contained in:
parent
c1802b5c21
commit
646d2d1c76
@ -256,6 +256,7 @@ public class AssetBundleMap : EditorWindow
|
|||||||
{BuildTarget.iOS, "/ios/"},
|
{BuildTarget.iOS, "/ios/"},
|
||||||
{BuildTarget.Android, "/AssetsAndroid/"},
|
{BuildTarget.Android, "/AssetsAndroid/"},
|
||||||
{BuildTarget.StandaloneWindows64, "/AssetsPC/"},
|
{BuildTarget.StandaloneWindows64, "/AssetsPC/"},
|
||||||
|
{BuildTarget.WebGL, "/WebGl/"},
|
||||||
};
|
};
|
||||||
|
|
||||||
private static void EncryptAssetsmapping(string destPath, string filePath)
|
private static void EncryptAssetsmapping(string destPath, string filePath)
|
||||||
|
|||||||
@ -1158,5 +1158,10 @@ public class AssetBundleUtil : EditorWindow
|
|||||||
{
|
{
|
||||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SwitchWebGlPlatform()
|
||||||
|
{
|
||||||
|
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WebGL, BuildTarget.WebGL);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@ -180,6 +180,11 @@ public class BundleBuilderZ : EditorWindow
|
|||||||
PlayerSettings.Android.keyaliasPass = "KlYX666Ro";
|
PlayerSettings.Android.keyaliasPass = "KlYX666Ro";
|
||||||
locationPathName += apkName + ".apk";
|
locationPathName += apkName + ".apk";
|
||||||
}
|
}
|
||||||
|
else if(BuildTarget.WebGL == target)
|
||||||
|
{
|
||||||
|
locationPathName = Application.dataPath;
|
||||||
|
locationPathName = locationPathName.Replace("Assets", "/BunityWebGl/");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
target = BuildTarget.StandaloneWindows64;
|
target = BuildTarget.StandaloneWindows64;
|
||||||
@ -275,6 +280,10 @@ public class BundleBuilderZ : EditorWindow
|
|||||||
{
|
{
|
||||||
path = path + "/AssetsAndroid/";
|
path = path + "/AssetsAndroid/";
|
||||||
}
|
}
|
||||||
|
else if (buildTarget == BuildTarget.WebGL)
|
||||||
|
{
|
||||||
|
path = path + "/WebGl/";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
path = path + "/AssetsPC/";
|
path = path + "/AssetsPC/";
|
||||||
|
|||||||
@ -159,6 +159,10 @@ public class AssetImportCheck : AssetPostprocessor
|
|||||||
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
||||||
pluginImporter.SetCompatibleWithPlatform(BuildTarget.iOS, true);
|
pluginImporter.SetCompatibleWithPlatform(BuildTarget.iOS, true);
|
||||||
break;
|
break;
|
||||||
|
case "WebGl":
|
||||||
|
pluginImporter.SetCompatibleWithAnyPlatform(false);
|
||||||
|
pluginImporter.SetCompatibleWithPlatform(BuildTarget.WebGL, true);
|
||||||
|
break;
|
||||||
case "Default":
|
case "Default":
|
||||||
pluginImporter.SetCompatibleWithAnyPlatform(true);
|
pluginImporter.SetCompatibleWithAnyPlatform(true);
|
||||||
pluginImporter.SetExcludeFromAnyPlatform(BuildTarget.Android, true);
|
pluginImporter.SetExcludeFromAnyPlatform(BuildTarget.Android, true);
|
||||||
|
|||||||
@ -105,6 +105,11 @@ namespace Pack
|
|||||||
public const string PluginiOSDestPath = "/Plugins/iOS/";
|
public const string PluginiOSDestPath = "/Plugins/iOS/";
|
||||||
public const string PluginiOSSrcMetaPath = "/../Build/BuildDependenceResource/Plugins/iOS.meta";
|
public const string PluginiOSSrcMetaPath = "/../Build/BuildDependenceResource/Plugins/iOS.meta";
|
||||||
|
|
||||||
|
public const string PluginWebGlSrcPath = "/../Build/BuildDependenceResource/Plugins/WebGl/";
|
||||||
|
public const string PluginWebGlDestMetaPath = "/Plugins/WebGl.meta";
|
||||||
|
public const string PluginWebGlDestPath = "/Plugins/WebGl/";
|
||||||
|
public const string PluginWebGlSrcMetaPath = "/../Build/BuildDependenceResource/Plugins/WebGl.meta";
|
||||||
|
|
||||||
public const string SDKBridgeDestPath = "/Plugins/SDKBridge/";
|
public const string SDKBridgeDestPath = "/Plugins/SDKBridge/";
|
||||||
public const string SDKBridgeDestMetaPath = "/Plugins/SDKBridge.meta";
|
public const string SDKBridgeDestMetaPath = "/Plugins/SDKBridge.meta";
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ namespace Pack
|
|||||||
new GUIContent("iOS"),
|
new GUIContent("iOS"),
|
||||||
new GUIContent("StandaloneWindows64"),
|
new GUIContent("StandaloneWindows64"),
|
||||||
new GUIContent("WeiDuanAndroid"),
|
new GUIContent("WeiDuanAndroid"),
|
||||||
|
new GUIContent("WebGl"),
|
||||||
};
|
};
|
||||||
|
|
||||||
private Type[] types = new Type[]
|
private Type[] types = new Type[]
|
||||||
@ -21,6 +22,7 @@ namespace Pack
|
|||||||
typeof(PackPlatformiOS),
|
typeof(PackPlatformiOS),
|
||||||
typeof(PackPlatformPC),
|
typeof(PackPlatformPC),
|
||||||
typeof(PackPlatformWeiDuanAndroid),
|
typeof(PackPlatformWeiDuanAndroid),
|
||||||
|
typeof(PackPlatformWebGl),
|
||||||
};
|
};
|
||||||
|
|
||||||
private string[] channelIds = new string[]
|
private string[] channelIds = new string[]
|
||||||
@ -29,6 +31,7 @@ namespace Pack
|
|||||||
"20000000",
|
"20000000",
|
||||||
"1",
|
"1",
|
||||||
"10000000",
|
"10000000",
|
||||||
|
"31",
|
||||||
};
|
};
|
||||||
|
|
||||||
private int m_SelectPackPlatformNameIdx = -1;
|
private int m_SelectPackPlatformNameIdx = -1;
|
||||||
|
|||||||
@ -12,6 +12,7 @@ namespace Pack
|
|||||||
BuildTarget.Android.ToString(),
|
BuildTarget.Android.ToString(),
|
||||||
BuildTarget.iOS.ToString(),
|
BuildTarget.iOS.ToString(),
|
||||||
BuildTarget.StandaloneWindows64.ToString(),
|
BuildTarget.StandaloneWindows64.ToString(),
|
||||||
|
BuildTarget.WebGL.ToString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
private string[] m_SelectedPlatforms = new string[0];
|
private string[] m_SelectedPlatforms = new string[0];
|
||||||
|
|||||||
@ -16,7 +16,8 @@ namespace Pack
|
|||||||
private PackPlatformiOS[] iOSs;
|
private PackPlatformiOS[] iOSs;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private PackPlatformPC[] pCs;
|
private PackPlatformPC[] pCs;
|
||||||
|
[SerializeField]
|
||||||
|
private PackPlatformWebGl[] webGLs;
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
public PackPlatformBase[] packPlatforms;
|
public PackPlatformBase[] packPlatforms;
|
||||||
|
|
||||||
@ -27,12 +28,14 @@ namespace Pack
|
|||||||
androids = null;
|
androids = null;
|
||||||
iOSs = null;
|
iOSs = null;
|
||||||
pCs = null;
|
pCs = null;
|
||||||
|
webGLs = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<PackPlatformAndroid> androidLs = new List<PackPlatformAndroid>();
|
List<PackPlatformAndroid> androidLs = new List<PackPlatformAndroid>();
|
||||||
List<PackPlatformWeiDuanAndroid> weiDuanAndroidLs = new List<PackPlatformWeiDuanAndroid>();
|
List<PackPlatformWeiDuanAndroid> weiDuanAndroidLs = new List<PackPlatformWeiDuanAndroid>();
|
||||||
List<PackPlatformiOS> iOSLs = new List<PackPlatformiOS>();
|
List<PackPlatformiOS> iOSLs = new List<PackPlatformiOS>();
|
||||||
List<PackPlatformPC> pCLs = new List<PackPlatformPC>();
|
List<PackPlatformPC> pCLs = new List<PackPlatformPC>();
|
||||||
|
List<PackPlatformWebGl> webGlLs = new List<PackPlatformWebGl>();
|
||||||
for (int i = 0, iMax = packPlatforms.Length; i < iMax; i++)
|
for (int i = 0, iMax = packPlatforms.Length; i < iMax; i++)
|
||||||
{
|
{
|
||||||
PackPlatformBase packPlatformBase = packPlatforms[i];
|
PackPlatformBase packPlatformBase = packPlatforms[i];
|
||||||
@ -52,6 +55,10 @@ namespace Pack
|
|||||||
{
|
{
|
||||||
pCLs.Add(packPlatformBase as PackPlatformPC);
|
pCLs.Add(packPlatformBase as PackPlatformPC);
|
||||||
}
|
}
|
||||||
|
else if (packPlatformBase is PackPlatformWebGl)
|
||||||
|
{
|
||||||
|
webGlLs.Add(packPlatformBase as PackPlatformWebGl);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.LogErrorFormat("Not Support Type : {0} At Serialize", packPlatformBase.GetType().FullName);
|
Debug.LogErrorFormat("Not Support Type : {0} At Serialize", packPlatformBase.GetType().FullName);
|
||||||
@ -61,6 +68,7 @@ namespace Pack
|
|||||||
weiDuanAndroids = weiDuanAndroidLs.ToArray();
|
weiDuanAndroids = weiDuanAndroidLs.ToArray();
|
||||||
iOSs = iOSLs.ToArray();
|
iOSs = iOSLs.ToArray();
|
||||||
pCs = pCLs.ToArray();
|
pCs = pCLs.ToArray();
|
||||||
|
webGLs = webGlLs.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterDeserialize()
|
public void OnAfterDeserialize()
|
||||||
@ -70,6 +78,7 @@ namespace Pack
|
|||||||
FormatPackPlatforms(ref packPlatformLs, weiDuanAndroids);
|
FormatPackPlatforms(ref packPlatformLs, weiDuanAndroids);
|
||||||
FormatPackPlatforms(ref packPlatformLs, iOSs);
|
FormatPackPlatforms(ref packPlatformLs, iOSs);
|
||||||
FormatPackPlatforms(ref packPlatformLs, pCs);
|
FormatPackPlatforms(ref packPlatformLs, pCs);
|
||||||
|
FormatPackPlatforms(ref packPlatformLs, webGLs);
|
||||||
packPlatforms = packPlatformLs.ToArray();
|
packPlatforms = packPlatformLs.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -439,6 +439,9 @@ namespace MikuLuaProfiler
|
|||||||
case BuildTarget.iOS:
|
case BuildTarget.iOS:
|
||||||
bg = BuildTargetGroup.iOS;
|
bg = BuildTargetGroup.iOS;
|
||||||
break;
|
break;
|
||||||
|
case BuildTarget.WebGL:
|
||||||
|
bg = BuildTargetGroup.WebGL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
string path = PlayerSettings.GetScriptingDefineSymbolsForGroup(bg);
|
string path = PlayerSettings.GetScriptingDefineSymbolsForGroup(bg);
|
||||||
bool hasRecompile = false;
|
bool hasRecompile = false;
|
||||||
|
|||||||
@ -23,7 +23,8 @@
|
|||||||
"USE_LUA",
|
"USE_LUA",
|
||||||
"VUPLEX_CCU",
|
"VUPLEX_CCU",
|
||||||
"NULLSDK",
|
"NULLSDK",
|
||||||
"OPENGM"
|
"OPENGM",
|
||||||
|
"UNITY_INSTANTGAME"
|
||||||
],
|
],
|
||||||
"logo1RelativePath": "default.png",
|
"logo1RelativePath": "default.png",
|
||||||
"loginRelativePath": "Default",
|
"loginRelativePath": "Default",
|
||||||
@ -333,7 +334,8 @@
|
|||||||
"USE_LUA",
|
"USE_LUA",
|
||||||
"VUPLEX_CCU",
|
"VUPLEX_CCU",
|
||||||
"NULLSDK",
|
"NULLSDK",
|
||||||
"OPENGM"
|
"OPENGM",
|
||||||
|
"UNITY_INSTANTGAME"
|
||||||
],
|
],
|
||||||
"logo1RelativePath": "default.png",
|
"logo1RelativePath": "default.png",
|
||||||
"loginRelativePath": "Default",
|
"loginRelativePath": "Default",
|
||||||
@ -392,5 +394,54 @@
|
|||||||
"specialInfoUrl": "https://test-noticegmt-wt.wtgames.cn/channel",
|
"specialInfoUrl": "https://test-noticegmt-wt.wtgames.cn/channel",
|
||||||
"customerServiceInfoUrl": "https://test-noticegmt-wt.wtgames.cn/vipService"
|
"customerServiceInfoUrl": "https://test-noticegmt-wt.wtgames.cn/vipService"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"webGLs": [
|
||||||
|
{
|
||||||
|
"channelName": "文庭",
|
||||||
|
"appName": "仙境归来",
|
||||||
|
"distributeName": "无SDK版本",
|
||||||
|
"channelUniqueId": "31",
|
||||||
|
"bundleId": "com.wt.no.sdk.test",
|
||||||
|
"gameVersionCode": {
|
||||||
|
"major": 0,
|
||||||
|
"minor": 0,
|
||||||
|
"release": 0,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"resVersionCode": {
|
||||||
|
"major": 0,
|
||||||
|
"minor": 0,
|
||||||
|
"release": 0,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"iconRelativePath": "Default",
|
||||||
|
"defineSymbols": [
|
||||||
|
"USE_LUA",
|
||||||
|
"NULLSDK",
|
||||||
|
"OPENGM"
|
||||||
|
],
|
||||||
|
"logo1RelativePath": "default.png",
|
||||||
|
"loginRelativePath": "Default",
|
||||||
|
"gameAssetsPath": "Default",
|
||||||
|
"specialFuncShield": false,
|
||||||
|
"splashScreenRelativeFiles": [
|
||||||
|
"wenting_splash.png"
|
||||||
|
],
|
||||||
|
"obscureKey": "",
|
||||||
|
"obscureOffsetMin": 0,
|
||||||
|
"obscureOffsetValues": [],
|
||||||
|
"sdkVerifyUrl": "https://test-roserverlist-wt.wtgames.cn/",
|
||||||
|
"serverListUrl": "https://test-roserverlist-wt.wtgames.cn/serverlist",
|
||||||
|
"notifyUrl": "https://test-noticegmt-wt.wtgames.cn/v3/notice",
|
||||||
|
"specialInfoUrl": "https://test-noticegmt-wt.wtgames.cn/channel",
|
||||||
|
"customerServiceInfoUrl": "https://test-noticegmt-wt.wtgames.cn/vipService",
|
||||||
|
"leBian_MainChId": "69035",
|
||||||
|
"leBian_ClientChId": "wenting_test",
|
||||||
|
"leBian_SECID": "tx75web0.c",
|
||||||
|
"plugins": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
|
"sdkBridges": []
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user