| | |
| | |
|
| | | if (smallPackages.Count > 0)
|
| | | {
|
| | | FileExtersion.DirectoryCopy(_assetBundlePath, ResourcesPath.Instance.StreamingAssetPath);
|
| | |
|
| | | var files = new List<FileInfo>();
|
| | | FileExtersion.GetAllDirectoryFileInfos(ResourcesPath.Instance.StreamingAssetPath, files);
|
| | | foreach (var file in files)
|
| | | {
|
| | | var fileName = Path.GetFileName(file.FullName);
|
| | | if (!fileName.Contains("builtin"))
|
| | | {
|
| | | File.Delete(file.FullName);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < smallPackages.Count; i++)
|
| | | {
|
| | | #if UNITY_ANDROID
|
| | |
| | | projectSettings.ApplyModifiedProperties();
|
| | |
|
| | | PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill;
|
| | | }
|
| | |
|
| | | var logoFromPath = "Assets/Editor/Logo/" + _versionName + "/TB_DL_Logo.png";
|
| | | var logoToPath = "Assets/Resources/UI/Sprites/TB_DL_Logo.png";
|
| | | AssetDatabase.DeleteAsset(logoToPath);
|
| | | AssetDatabase.CopyAsset(logoFromPath, logoToPath);
|
| | |
|
| | | var logoImporterPath = "Assets/Resources/UI/Sprites/TB_DL_Logo.png";
|
| | | var logoImporter = AssetImporter.GetAtPath(logoImporterPath);
|
| | | var logoTextureImporter = logoImporter as TextureImporter;
|
| | | if (logoTextureImporter != null)
|
| | | {
|
| | | logoTextureImporter.textureType = TextureImporterType.Sprite;
|
| | | logoTextureImporter.spritePackingTag = string.Empty;
|
| | | logoTextureImporter.assetBundleName = string.Empty;
|
| | |
|
| | | var platformSetting = new TextureImporterPlatformSettings();
|
| | | switch (buildTarget)
|
| | | {
|
| | | case BuildTargetGroup.Android:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "Android";
|
| | | platformSetting.maxTextureSize = 512;
|
| | | platformSetting.format = TextureImporterFormat.ETC2_RGBA8;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | case BuildTargetGroup.iOS:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "iOS";
|
| | | platformSetting.maxTextureSize = 512;
|
| | | platformSetting.format = TextureImporterFormat.PVRTC_RGBA4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | }
|
| | |
|
| | | logoTextureImporter.SetPlatformTextureSettings(platformSetting);
|
| | | AssetDatabase.ImportAsset(logoImporterPath);
|
| | | EditorUtility.SetDirty(logoTextureImporter);
|
| | | }
|
| | |
|
| | | var backGroundFromPath = "Assets/Editor/Logo/" + _versionName + "/Launch.png";
|
| | | var backGroundToPath = "Assets/Resources/UI/Sprites/Launch.png";
|
| | | AssetDatabase.DeleteAsset(backGroundToPath);
|
| | | AssetDatabase.CopyAsset(backGroundFromPath, backGroundToPath);
|
| | |
|
| | | var backGroundImporterPath = "Assets/Resources/UI/Sprites/Launch.png";
|
| | | var backGrouindImporter = AssetImporter.GetAtPath(backGroundImporterPath);
|
| | | var backGroundTextureImporter = backGrouindImporter as TextureImporter;
|
| | | if (backGroundTextureImporter != null)
|
| | | {
|
| | | backGroundTextureImporter.textureType = TextureImporterType.Sprite;
|
| | | backGroundTextureImporter.spritePackingTag = string.Empty;
|
| | | backGroundTextureImporter.assetBundleName = string.Empty;
|
| | |
|
| | | var platformSetting = new TextureImporterPlatformSettings();
|
| | | switch (buildTarget)
|
| | | {
|
| | | case BuildTargetGroup.Android:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "Android";
|
| | | platformSetting.maxTextureSize = 1024;
|
| | | platformSetting.format = TextureImporterFormat.ETC2_RGB4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | case BuildTargetGroup.iOS:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "iOS";
|
| | | platformSetting.maxTextureSize = 1024;
|
| | | platformSetting.format = TextureImporterFormat.PVRTC_RGBA4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | }
|
| | |
|
| | | backGroundTextureImporter.SetPlatformTextureSettings(platformSetting);
|
| | | AssetDatabase.ImportAsset(backGroundImporterPath);
|
| | | EditorUtility.SetDirty(backGroundTextureImporter);
|
| | | }
|
| | |
|
| | | var loginBackGroundFromPath = "Assets/Editor/Logo/" + _versionName + "/LoginBackGround.png";
|
| | | var loginBackGroundToPath = "Assets/Resources/UI/Sprites/LoginBackGround.png";
|
| | | AssetDatabase.DeleteAsset(loginBackGroundToPath);
|
| | | AssetDatabase.CopyAsset(loginBackGroundFromPath, loginBackGroundToPath);
|
| | |
|
| | | var loginBackGroundImporterPath = "Assets/Resources/UI/Sprites/LoginBackGround.png";
|
| | | var loginBackGrouindImporter = AssetImporter.GetAtPath(loginBackGroundImporterPath);
|
| | | var loginBackGroundTextureImporter = loginBackGrouindImporter as TextureImporter;
|
| | | if (loginBackGroundTextureImporter != null)
|
| | | {
|
| | | loginBackGroundTextureImporter.textureType = TextureImporterType.Sprite;
|
| | | loginBackGroundTextureImporter.spritePackingTag = string.Empty;
|
| | | loginBackGroundTextureImporter.assetBundleName = string.Empty;
|
| | |
|
| | | var platformSetting = new TextureImporterPlatformSettings();
|
| | | switch (buildTarget)
|
| | | {
|
| | | case BuildTargetGroup.Android:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "Android";
|
| | | platformSetting.maxTextureSize = 1024;
|
| | | platformSetting.format = TextureImporterFormat.ETC2_RGB4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | case BuildTargetGroup.iOS:
|
| | | platformSetting.overridden = true;
|
| | | platformSetting.allowsAlphaSplitting = false;
|
| | | platformSetting.name = "iOS";
|
| | | platformSetting.maxTextureSize = 1024;
|
| | | platformSetting.format = TextureImporterFormat.PVRTC_RGBA4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | break;
|
| | | }
|
| | |
|
| | | loginBackGroundTextureImporter.SetPlatformTextureSettings(platformSetting);
|
| | | AssetDatabase.ImportAsset(loginBackGroundImporterPath);
|
| | | EditorUtility.SetDirty(loginBackGroundTextureImporter);
|
| | | }
|
| | | }
|
| | |
|