Skip to content

Android build always has Texture Compression set to PVRTC #151

Description

@DmiShib

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  
});
  1. For Android, the subtarget is an enum MobileTextureSubtarget.
  2. When creating BuildArchitecture for Android, we don’t pass the fifth argument, so the default parameter value is StandaloneBuildSubtarget.Player
  3. StandaloneBuildSubtarget.Player equals 2, meaning subtarget = 2, which corresponds to MobileTextureSubtarget.PVRTC

If you specify something like subtarget = (int)EditorUserBuildSettings.androidBuildSubtarget, it works correctly, but obviously, that’s not the solution. :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions