Unity export with transparent background

hi all,
have search everywhere for a straight answer to this. I’m trying to export a Unity scene and have it overlay on top of iOS. Is there anyway to do this? Does Unity offers any solution for this kind of integration with native mobile app?
I’ve seen a demo of it on

…but the last comment says that it doesn’t work in Unity5.x -

Thanks to someone who comment in the last post at: GeekyHamster.com: UnityPlayer as Subview with Transparent Background (iOS)

I tried it and it works nicely…

  1. In Unity, MainCamera ClearFlags set to solid color with alpha = 0
  2. Export to iOS
  3. In Xcode classes folder, search for 2 files :

a - GlesHelper.mm in CreateSystemRenderingSurfaceGLES method - Add this line:-

surface->layer.opaque = NO;

b - MetalHelper.mm in CreateSystemRenderingSurfaceMTL method -
Add these lines:-

surface->layer.opaque = NO;
CGFloat backgroundColor[] = {0,0,0,0};

ta-dah~~ transparent background. Tested on Unity version 5.2.3f

Thank you for your question and reply, it guide me here, it works fine in unity5.4.0 intergate with my app.

@xpkoalz

Any idea how to do it with Android?