Skip to main content

Background separation

How to enable Background separation in Unity Face AR SDK#

  1. Open Unity editor and find Background separation demo scene under Assets => BanubaFaceAR => FeatureBackground => Scenes => BackgroundScene. Move BackgroundScene to the scenes hierarchy and make it active. image See full image

  2. Run the scene to see how it works.

image

Add Background separation to mobile device build#

  1. To run background separation on mobile device, add the LoaderScene to the active scenes hierarchy first. Find LoaderScene under Assets => BanubaFaceAR => BaseAssets => Scenes => LoaderScene.

Open LoaderScene => Canvas and edit Scene field value from MinimalScene to BackgroundScene. image See full image

  1. Step for Android only: open Edit => Project Settings => Player and select Android tab. Remove Vulkan from the Graphics API (leave only OpenGLES3). It's better to restart Unity editor afterwards. image See full image

  2. Open File => Build Settings => Select your platform. Click App Open Scenes to add BackgroundScene. Leave active only LoaderScene and BackgroundScene. image

  3. Click Switch Platform and then Build And Run.

Last updated on