| | |
| | |
|
| | | var versionName = string.Empty;
|
| | | var versionConfig = GetVersionConfig(_publisher, out versionName);
|
| | | var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs";
|
| | | var text = File.ReadAllText(versionConfigCSpath);
|
| | | // var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs";
|
| | | // var text = File.ReadAllText(versionConfigCSpath);
|
| | |
|
| | | if (text.Contains("VERSION_ALTERNATIVE"))
|
| | | {
|
| | | var pattern = "VERSION_ALTERNATIVE = \".*\"";
|
| | | text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\""));
|
| | | // if (text.Contains("VERSION_ALTERNATIVE"))
|
| | | // {
|
| | | // var pattern = "VERSION_ALTERNATIVE = \".*\"";
|
| | | // text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\""));
|
| | |
|
| | | bool encoderShouldEmitUTF8Identifier = true;
|
| | | bool throwOnInvalidBytes = false;
|
| | | UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes);
|
| | | bool append = false;
|
| | | StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding);
|
| | | streamWriter.Write(text);
|
| | | streamWriter.Close();
|
| | | AssetDatabase.ImportAsset(versionConfigCSpath);
|
| | | }
|
| | | // bool encoderShouldEmitUTF8Identifier = true;
|
| | | // bool throwOnInvalidBytes = false;
|
| | | // UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes);
|
| | | // bool append = false;
|
| | | // StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding);
|
| | | // streamWriter.Write(text);
|
| | | // streamWriter.Close();
|
| | | // AssetDatabase.ImportAsset(versionConfigCSpath);
|
| | | // }
|
| | |
|
| | | // 针对某一些打包的特殊性, 这里特指依赖的第三方库含有资源的问题
|
| | | // 这里对有这种特型的渠道的sdk在打包的时候差异化gradle文件
|
| | |
| | | var splashScreenLogo = PlayerSettings.SplashScreenLogo.Create(3, splashImage);
|
| | | PlayerSettings.SplashScreen.logos = new PlayerSettings.SplashScreenLogo[] { splashScreenLogo };
|
| | |
|
| | | if (buildTarget == BuildTargetGroup.Android)
|
| | | {
|
| | | var projectSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset")[0]);
|
| | | var splashImageSetting = projectSettings.FindProperty("androidSplashScreen");
|
| | | splashImageSetting.objectReferenceValue = splashImage.texture;
|
| | | projectSettings.ApplyModifiedProperties();
|
| | | // if (buildTarget == BuildTargetGroup.Android)
|
| | | // {
|
| | | // var projectSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset")[0]);
|
| | | // var splashImageSetting = projectSettings.FindProperty("androidSplashScreen");
|
| | | // splashImageSetting.objectReferenceValue = splashImage.texture;
|
| | | // projectSettings.ApplyModifiedProperties();
|
| | |
|
| | | PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill;
|
| | | }
|
| | | // PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill;
|
| | | // }
|
| | | }
|
| | |
|
| | | public static void SetCreateRoleAnimation()
|