| | |
| | | set { LocalSave.SetInt("HalfAssetPrior", value); }
|
| | | }
|
| | |
|
| | | static string ANDROID_PLUGIN_PATH = Application.dataPath + "/Plugins/Android";
|
| | | static string THE_2TH_WORLD_SDK_PATH = Application.dataPath + "/Plugins/Android/bin";
|
| | | static string MANIFEST_PATH = Application.dataPath + "/Plugins/Android/AndroidManifest.xml";
|
| | | static string iOS_PLUGIN_PATH = Application.dataPath + "/Plugins/iOS";
|
| | |
|
| | | /// <summary>
|
| | |
| | |
|
| | | PlayerSettings.enableInternalProfiler = _development;
|
| | |
|
| | | if (Directory.Exists(ANDROID_PLUGIN_PATH))
|
| | | //删除原sdk文件
|
| | | if (Directory.Exists(THE_2TH_WORLD_SDK_PATH))
|
| | | Directory.Delete(THE_2TH_WORLD_SDK_PATH, true);
|
| | | //删除原清单文件
|
| | | if (File.Exists(MANIFEST_PATH))
|
| | | File.Delete(MANIFEST_PATH);
|
| | |
|
| | | var variant = _development ? "debug" : "release";
|
| | |
|
| | | var manifestpath = StringUtility.Contact(_sdkPath, "/Channel/Android/", versionConfig.appId, "/AndroidManifest.xml");
|
| | | var channelSdkPath = StringUtility.Contact(_sdkPath, "/Channel/Android/", versionConfig.appId, "/", variant);
|
| | |
|
| | | if (File.Exists(manifestpath))
|
| | | {
|
| | | Directory.Delete(ANDROID_PLUGIN_PATH, true);
|
| | | File.Copy(manifestpath, MANIFEST_PATH);
|
| | | DebugEx.LogFormat("执行Android 清单文件拷贝,from:{0};to:{1}", manifestpath, MANIFEST_PATH);
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.LogFormat("Android 清单文件不存在,{0}", manifestpath);
|
| | | // return;
|
| | | }
|
| | |
|
| | | Debug.LogFormat("执行Android SDK 文件拷贝,from:{0};to:{1}", StringUtility.Contact(_sdkPath, "/Android/release"), ANDROID_PLUGIN_PATH);
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(_sdkPath, "/Android/release"), ANDROID_PLUGIN_PATH);
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(_sdkPath, "/ChannelDiff/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH);
|
| | | if (Directory.Exists(channelSdkPath))
|
| | | {
|
| | | FileExtersion.DirectoryCopy(channelSdkPath, THE_2TH_WORLD_SDK_PATH);
|
| | | DebugEx.LogFormat("执行Android 渠道SDK 文件拷贝,from:{0};to:{1}", channelSdkPath, THE_2TH_WORLD_SDK_PATH);
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.LogFormat("Android 渠道SDK文件不存在,{0}", channelSdkPath);
|
| | | return;
|
| | | }
|
| | |
|
| | | var option = AssetDatabase.LoadAssetAtPath<Options>("Assets/Editor/Beebyte/Obfuscator/ObfuscatorOptions.asset");
|
| | | if (option != null)
|