TIL Xbox UWP Basic Fixes

Sunder Iyer - Apr 7 '21 - - Dev Community

2021-04-06

There are two basic issues when you output a Unity game to Xbox as a UWP application. The first one is the visible white edges (tv overscan) and the second one is the mouse pointer.

Most of the official docs describes solutions for C# XAML but Unity only supports IL2CPP for UWP builds.

To address this change, you need to edit app.xaml.cpp instead.

App::App()
{
    InitializeComponent();
    Application::Current->RequiresPointerMode = ApplicationRequiresPointerMode::WhenRequested; // mouse mode off
// 
void App::InitializeUnity(String^ args)
{
    ApplicationView::GetForCurrentView()->SuppressSystemOverlays = true;
    ApplicationView::GetForCurrentView()->SetDesiredBoundsMode(ApplicationViewBoundsMode::UseCoreWindow); // overscan fix
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .