-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
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. :)