Search Unity

Question Texture 'Platform Overrides' advise..

Discussion in 'Asset Importing & Exporting' started by Nintenjo64, Nov 21, 2022.

  1. Nintenjo64

    Nintenjo64

    Joined:
    May 19, 2015
    Posts:
    12
    So we are buiding a title for many platforms including PC, iOS, tvOS and Android so we often need to use the platform overrides on alt platforms to crunch compression quality etc.

    However, the issue I'm having is as soon as you enable a platform override (for example iOS) it also overrides the 'Max Size' setting. However, we don't want to override the max size, only the compression quality (ie ASTC 8x8 Block) we simply want the Max Size to inherit from the 'Default' ..

    How are you meant to use this feature effectively with a large collection of assets. This means that once the flag is enabled to override it will always stay at the max size that was set at the point of the flag is switched on and it will no longer inherit from the default even if the default is changed.

    Would it not make more sense to have an override flag per setting so you can for example override the compression quality 'only' ??
     
  2. Nintenjo64

    Nintenjo64

    Joined:
    May 19, 2015
    Posts:
    12
    Here is an example of what I'm trying to describe..
     

    Attached Files:

  3. bastien_humeau

    bastien_humeau

    Unity Technologies

    Joined:
    Jun 14, 2017
    Posts:
    191
    I fully agree with you... unfortunately the current data structure doesn't allow us to do that without breaking existing projects.
    While we are working on new importers we are thinking about this issue and will provide better ways to handle that in the future.

    A not-so-friendly solution for now would be to handle the setting directly from an OnPreprocessTexture method. You can check the current platform from the AssetImportContext there and enforce whatever setting you want on the importer.
    It is less friendly and less discoverable than a nice UI to drive the values, but it will make sure you don't accidentally forget or break a setting on a specific file.