How to Fix White Border Screen on Xbox One games made in Unity3d

After the Xbox Live Creators Program went up, several developers started porting their games to the Xbox One Platform to be released under the Creators Collection of the store, but some started experiencing certain problems while running the game on the console, I personally encountered a couple of them while porting Apex Particle, In this series of posts I will the cover the ones that seems to be the most problematic in the unity forums that doesn’t seem to be solved in any other part of the internet. As usual, there are several solutions you could try and I am always open to changes and recommendations in the comments section, Let’s Begin.

According to some internet users all over the different programming forums (and personal experiences), the white border are caused by a missing “Full Screen” configuration that gets lost during compilation process while building for XAML under the “Build Type” settings. There are several solutions you could try to get your game to display in full screen mode on your Xbox One.

Option 1-.  Change the  Build Type Settings to D3D (Recomended)

Inside Unity  Under File>Build Settings, Set the Build Type to D3D.

D3d Build Setting

There are countless discussions about the benefits and differences of using D3D over Xaml and vice versa, mainly because Xaml allows you to add Windows based (native uwp) UI controls, like AdControl (in game ads) and the TouchScreenKeyboard Keyboard control, while D3D generally offers you a little bump in performance and a reduced memory usage , nonetheless, it seems this particular white screen bug only affects while building for xaml. This solution apparently fixed the problem on 100% of the cases, unless you are using xaml controls or modifyingthe build in visual studio after compilation, this is the recommended approach, as it also solves the Visible cursor on startup problem in Xbox.

Option 2 & 3-. Manually Set the WindowingMode in App.xaml.cs OR  App.xaml.cpp depending on your scripting backend (IL2cpp or .net)

Unity uses ViewManagement class under the hood when you set it to full screen via the unity editor, which means you can manually set it at application startup, to do that you must first generate the unity build, and open the solution in visual studio and search for the App.Xaml.Cpp (or .cs) file in your solution explorer. This solution was pretty much hit or miss with all the others developer I encountered on Twitter and the Unity forums.

Visual Studio Solution Explorer
Visual Studio Solution Explorer

App.Xaml.cs ( for .Net Scripting Backend, uses C#)

ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen;

App.Xaml.cpp ( for IL2CP Scripting Backend , uses C++)

Windows::UI::ViewManagement::ApplicationView::PreferredLaunchWindowingMode =
 Windows::UI::ViewManagement::ApplicationViewWindowingMode::FullScreen;

If you encounter other solutions or problems related to this issue don’t be scared to make contact with me.

Leave a Reply

Your email address will not be published. Required fields are marked *