| | |
| | |
|
| | | 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 importerPath = "Assets/Resources/UI/Sprites/TB_DL_Logo.png";
|
| | | var importer = AssetImporter.GetAtPath(importerPath);
|
| | | var textureImporter = importer as TextureImporter;
|
| | | if (textureImporter != null)
|
| | | var logoImporterPath = "Assets/Resources/UI/Sprites/TB_DL_Logo.png";
|
| | | var logoImporter = AssetImporter.GetAtPath(logoImporterPath);
|
| | | var logoTextureImporter = logoImporter as TextureImporter;
|
| | | if (logoTextureImporter != null)
|
| | | {
|
| | | textureImporter.textureType = TextureImporterType.Sprite;
|
| | | textureImporter.spritePackingTag = string.Empty;
|
| | | textureImporter.assetBundleName = string.Empty;
|
| | | logoTextureImporter.textureType = TextureImporterType.Sprite;
|
| | | logoTextureImporter.spritePackingTag = string.Empty;
|
| | | logoTextureImporter.assetBundleName = string.Empty;
|
| | |
|
| | | var platformSetting = new TextureImporterPlatformSettings();
|
| | |
|
| | | switch (buildTarget)
|
| | | {
|
| | | case BuildTargetGroup.Android:
|
| | |
| | | platformSetting.maxTextureSize = 512;
|
| | | platformSetting.format = TextureImporterFormat.ETC2_RGBA8;
|
| | | platformSetting.compressionQuality = 1;
|
| | | textureImporter.SetPlatformTextureSettings(platformSetting);
|
| | | break;
|
| | | case BuildTargetGroup.iOS:
|
| | | platformSetting.overridden = true;
|
| | |
| | | platformSetting.maxTextureSize = 512;
|
| | | platformSetting.format = TextureImporterFormat.PVRTC_RGBA4;
|
| | | platformSetting.compressionQuality = 1;
|
| | | textureImporter.SetPlatformTextureSettings(platformSetting);
|
| | | break;
|
| | | }
|
| | |
|
| | | AssetDatabase.ImportAsset(importerPath);
|
| | | EditorUtility.SetDirty(textureImporter);
|
| | | 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);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | static BuildTargetGroup GetBuildTarget()
|