Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[Unity 5.4]Platfrom string of Windows Store App

Discussion in 'Windows' started by kINGlu, Aug 18, 2016.

  1. kINGlu

    kINGlu

    Joined:
    Apr 15, 2013
    Posts:
    8
    Hello guys! I meet a problem in using the api "SetPlatformTextureSettings"...
    I know in Android and iPhone the platform string is "Android" and "iPhone", but what is the platform string in Windows Store App(Universal 10)? I'm using Unity 5.4.0.f3 upload_2016-8-18_11-52-47.png
    And this is my build setting
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    It's "WindowsStoreApps".
     
  3. kINGlu

    kINGlu

    Joined:
    Apr 15, 2013
    Posts:
    8
    Thanks a lot! but i think it's not work.
    I just want to override textures when they are importing...
    Here is my code:
    importer.SetPlatformTextureSettings("Android", importer.maxTextureSize, TextureImporterFormat.ETC2_RGBA8, (int)TextureCompressionQuality.Best, true);
    importer.SetPlatformTextureSettings("iPhone", importer.maxTextureSize, TextureImporterFormat.PVRTC_RGBA4, (int)TextureCompressionQuality.Best, true);
    importer.SetPlatformTextureSettings("WindowsStoreApps", importer.maxTextureSize, TextureImporterFormat.DXT5, (int)TextureCompressionQuality.Best, true);
    "Android" and "iPhone" is work, but WindowsStoreApps is not work upload_2016-8-18_15-49-0.png
    upload_2016-8-18_15-49-20.png
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Oops, sorry about that. I made a mistake. It's actually "Windows Store Apps" - I missed spaces.
     
  5. kINGlu

    kINGlu

    Joined:
    Apr 15, 2013
    Posts:
    8
    lol..It' doesn't matter....;) And this time it wroks! thanks a lot, by the way, is there any documentation about those platform strings?
    I searched "docs.unity3d.com", it only contains android, iPhone, web and standalone, or did i miss something? :)
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Yeah, docs seem to be outdated. Here's the full list:

    "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "Tizen", "PSP2", "PS4", "PSM", "XboxOne", "Samsung TV", "Nintendo 3DS", "WiiU", "tvOS".

    I'll poke somebody about updating the docs.
     
  7. kINGlu

    kINGlu

    Joined:
    Apr 15, 2013
    Posts:
    8
    ok...ok... thank u..
     
  8. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    Hi, thanks for your help!!!

    TIP: You should change this function to avoid platform being defined by string... we should use the BuildTarget enum.