Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Scripting TextureImporter.SetPlatformTextureSettings requiring a boolean as 4th parameter

Discussion in '5.2 Beta' started by jmunozar, Jul 14, 2015.

  1. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    "TextureImpoter.SetPlatformTextureSettings" requires a 4th parameter which is a boolean. Checked in the API and there is no "Boolean" value in the function.

    And also on previous versions there are no boolean values as parameter in the function.
     
  2. Alex-Lian

    Alex-Lian

    Guest

    In looking, that was added for the ETC1 compression for sprite atlases on Android. Letting the dev know to update docs.

    The bool in question is: allowsAlphaSplit which only has impact for the Android situation.
     
  3. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    hey @Alex Lian,

    you are actually changing the API here, breaking backwards compatibility :/, why dont you guys just let the 3 method version have by default "false" the 4th parameter and create other function?

    I know I can use editor defines per version but its just not ideal.

    Thanks a lot.
     
  4. Alex-Lian

    Alex-Lian

    Guest

    The plan is to make the bool default to standard (previous) behavior. So, things should be addressed soon.
     
  5. sandboxed

    sandboxed

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    95
    As Alex said, we have made the fourth parameter default (to maintain backward compatibility).
    The feature was designed in a way that existing code needs not to be changed, but new code that wants to use this new feature (ETC1 compression) needed to turn the flag on.

    The fix to code and documentation is on its way.
    Thanks for pointing this out :)
     
  6. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    <3 thanks to you as well guys :)