Search Unity

Unity3D export to Android with transparent background?

Discussion in 'Android' started by ywj7931, Jan 11, 2018.

  1. Kritankboy

    Kritankboy

    Joined:
    Aug 8, 2020
    Posts:
    15
    I did this and it works, but is there a way to apply post processing effects over the Native UI to saturate or desaturate it. If no, can I achieve that any way, custom shaders? Anything? I want post effects to work for the Android screen. Pls help
     
  2. chgeorgiadis

    chgeorgiadis

    Joined:
    Jan 30, 2018
    Posts:
    51
    Can you do the same (transparent background) on an iOS app?
     
    Last edited: Feb 23, 2023
  3. mlam-3d

    mlam-3d

    Joined:
    Jul 14, 2023
    Posts:
    1
    I included a Unity3D game into my native Android app inside of a FrameLayout. I am trying to get the background of the Unity content transparent such that only the 3D Object is visible. I've already tried the following:

    In my Unity Project
    I set the Camera 'Clear Flag' to 'Solid Color' and chose #000000 as the color (0 alpha).
    In the 'Player Settings' I've checked the option Render over native UI.

    Opened the exported Unity project in my Android studio
    besides the necessary configs for the library part I tried out various things to get the transparent behaviour working. I've tried creating custom styles setting translucient and transparent color and assigned it to the Activity in the AndroidManifest. I've tried to set the Z order of the view in the OnCreate Method. I've try to set the background color of the mUnityPlayer manually in the OnCreate method. But all that didn't work. The Unity content inside of my native android app always renders with the color I've selected without setting the alpha value to 0.

    I would be more than thankful if anyoune could provide some help on this.
     
  4. riplut1

    riplut1

    Joined:
    Sep 4, 2019
    Posts:
    2
  5. wibu_991

    wibu_991

    Joined:
    Mar 1, 2021
    Posts:
    3