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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

2017.3.0b4 Transparency on Android

Discussion in '2017.3 Beta' started by crazyai2016, Oct 11, 2017.

  1. crazyai2016

    crazyai2016

    Joined:
    Jun 23, 2016
    Posts:
    4
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Yes, it does. The support is limited to OpenGL only at the moment, though (so no Vulkan).
     
  3. crazyai2016

    crazyai2016

    Joined:
    Jun 23, 2016
    Posts:
    4
    That's great! Thank you very much!
    But how should I do in unity setting or Android setting?Are there some examples?
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    There's a new checkbox in Android player settings, "Preserve framebuffer alpha".
    You need to check it and set the clear value in the camera to have alpha less than one.
    This enables rendering Unity on top of native Android UI.
     
  5. crazyai2016

    crazyai2016

    Joined:
    Jun 23, 2016
    Posts:
    4
    I have checked "Preserve framebuffer alpha" in Android player settings, and set the clear flag in the camera with the Solid Color,then set alpha less than one.But it doesn't work. I try the Depth only,Dont Clear too,and it doesn't work too.

    Which option in clear flag shoud I use?
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    The setup I used was:
    * Checked "Preserve framebuffer alpha" in player settings
    * Camera Clear Flags set to Solid Color
    * Clear color set to white with 0 alpha

    The Manifest.xml in the Android build has to have UnityThemeSelector.Translucent theme set for the application.