D3D - Window Size (Solved)

Hi,

I have maybe a noob question but since changing to D3D build because of Xbox, building Universal App, I no longer seem be able to find these or the corresponding files for D3D in Visual Studio, I edited both App, and MainPage .xaml before to fix the splash screen rotation and also set the default app screen resolution.

Using Unity latest…

Any advice, thank you…

They don’t exist in D3D project, as D3D doesn’t use Xaml. You only get App class, which creates a basic window and passes control of the main game loop to Unity (in the “Run” method). You should be able to fix your stuff there.

Thanks for confirming, this makes sense.

How would one set the default Game Window size for desktop build?, something that can be edited in App Class?
I ask because I wish to set a default size and not allow user to mess around with this, if they choose weird sizes the GUI is a mess.

For mobile and Xbox, it scales to users mobile and TV size, which is good stuff.

@Tomas1856 @Aurimas-Cernius
Looking at the App.cs Unity - Manual: AppCallbacks class reference
I cannot seem to find any reference, is this the wrong place?
Any ideas to solve this…see above

Perhaps you can use this:

I tried this:

// Set the preferred launch view size to 360 * 550
            ApplicationView.PreferredLaunchViewSize = new Size { Height = 550, Width = 360 };
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;

But it dont like the “Size” - the namespace or type size cannot be found…
Is this Xaml code again im getting confused with

Try Windows.Foundation.Size.

Thanks dude, this seems to have fixed the issues for me…