Android build always has Texture Compression set to PVRTC
This issue started occurring when I upgraded to 'Unity 6 Preview.'
I investigated this matter and can pinpoint the cause:
BuildReport buildReport = BuildPipeline.BuildPlayer(new BuildPlayerOptions
{
locationPathName = Path.Combine(buildPath, binName),
options = options,
scenes = releaseType.sceneList.GetActiveSceneFileList(),
target = architecture.target,
subtarget = (int)architecture.subtarget
});
- For Android, the
subtargetis an enumMobileTextureSubtarget. - When creating
BuildArchitecturefor Android, we don’t pass the fifth argument, so the default parameter value isStandaloneBuildSubtarget.Player -
StandaloneBuildSubtarget.Playerequals 2, meaningsubtarget = 2, which corresponds toMobileTextureSubtarget.PVRTC
If you specify something like subtarget = (int)EditorUserBuildSettings.androidBuildSubtarget, it works correctly, but obviously, that’s not the solution. :)
I want to add that, as a result, there are consequences in Google Play Console: a 66% decrease in supported devices because the following is added to the AndroidManifest: GL_IMG_texture_compression_pvrtc
Thanks for the detailed report, @DmiShib! The build subtarget property for BuildArchitecture was a very recent addition to enable adding support for the Dedicated Server platform, so this is an unintended side-effect of that change. This functionality is still in development, so it hasn't yet been fully tested to catch issues like this – for now, try using the latest released version of SuperUnityBuild, v7.0.0, to avoid this problem.