Search Unity

Texture Compression Build Settings - where is this setting saved (how to git commit)

Discussion in 'Editor & General Support' started by mptp, Oct 8, 2019.

  1. mptp

    mptp

    Joined:
    May 30, 2014
    Posts:
    29
    Our team is working on a great big project and we changed the default texture compression on Android to ASTC (which takes a TON of time to recompress everything, fair enough)

    We did the ol' git commit and git push, expecting that change to propagate to the whole team, but it seems to not have. After doing a little test in a smaller project, it seems like changing this setting and recompressing all textures doesn't change the state of the project repository at all - it looks like no tracked files in Assets, ProjectSettings, Packages etc. are changed at all?

    What exactly is being changed on disk when the default texture compression is changed? I feel like for such a major project setting that impacts teams heaps it should be a thing that can be committed to the project repository...

    (This in in 2018.4.14f1 by the way)
     
  2. kamil-pastwa-simfactor

    kamil-pastwa-simfactor

    Joined:
    Oct 8, 2021
    Posts:
    4
    +1
    Same problem in 2021.1.7f1
     
  3. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,065
    All options in the "Build Settings" window are user options intended to be set per build and are not part of version control (they are saved to "Library/EditorUserBuildSettings.asset"). All "permanent" settings are in the "Project Settings" window (and saved to the "ProjectSettings" folder).

    The Android Texture Compression override setting is intended to make special builds that use non-default texture compression, not to set the default texture compression of the project.

    You'd have to write a build script that changes this option before doing a build (using EditorUserBuildSettings.androidBuildSubtarget) or change the texture import settings for all the textures in your game (e.g. using presets).

    It's really Android that's an exception with this option. For all other platforms, the only way to change the default texture compression is to change it for each individual texture. IIRC there's a plan to make the default configurable but I don't think that has been implemented yet.