Creating Xbox game, unwanted cursor during runtime

Hi, I’m relatively new to unity all together, just reaching around 4 to 5 months with it, but I have a demo ready and I’m trying to disable the mouse that is in the uwp game all-together. I’ve looked it up, and it tells me that I need to use this piece of code for the constructor to my app:

public App() {
this.InitializeComponent();
this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested;
this.Suspending += OnSuspending;
}

But I don’t know where the author was meaning for me to put it. Am I supposed to put this into the app.xaml after the game is built on the visual studios file or do I input it into the game before the build?

where’s the constructor I’m looking for?

Are you able to build D3D build type instead of XAML? That will hide the cursor automatically.

1 Like

Thanks for the reply, for some reason I didn’t think the D3D was what I was looking for but it was, thanks again!