What does this feature mean - support for rendering Unity on top of native UI?

I can’t find more information about this new feature in Unity 2019:
iOS: Added support for rendering Unity on top of native UI on iOS and tvOS

Can someone give more details?

Thanks!

1 Like

Hi!
There’s a new flag in Player settings in Resolution and Presentation settings - “Render over native UI”. When this is checked, Unity will not set the whole alpha channel to 1 before giving the framebuffer to the OS for rendering. This makes it possible to e.g. set the camera to “Clear Color” mode, set alpha of the clear color to 0 and see the native iOS/Android UI below Unity view.

3 Likes

Yes.

Btw, this flag is there (was initially Android-only and called “Preserve framebuffer alpha”) since 2018.1.
iOS support came later :slight_smile:

2 Likes

Using regular render to texture.
Keep in mind - this is iOS, tvOS and Android only. This won’t work on desktop/consoles.

No, you might be able to do this on a mac, but not using this specific feature.

yup, should work

1 Like

You can do that on any platform. Just use an RGBA Render Texture.

Specifically: this provides an option to preserve the alpha channel when rendering to the backbuffer, and not only render textures.

1 Like

Probably, I’m not sure.
The feature was intended initially for “I have this awesome native UI that e.g. plays a video, I was some 3D content on top and be able to still see my awesome native UI”.

1 Like

For what its worth, it should also help address this issue that I’ve seen occur in mine and other’s Unity games - watching an ad, changing volume, or otherwise switching to the native UI (I guess?) can lock the framerate: