UWP Windows and Xbox UWP Problems and need check which platform

Hello,

Have Problems with DirectX12 that Unity Crash before Intro at 50 to 119MB RAM usage at Xbox One X and Xbox series S dont have Series X
Can send the right error because now when build it always uses only DirectX11 also if DirectX12 is at First in API list :frowning:

And at the XBox Series S with DirectX11 Terrain material not work right so can see trought terrain but at Xbox one and XBox One X no Problems

also with DirextX12 the TRacks and Displacment for tyree tracks work at XBox One at Windows it works With DirectX11 and DX2 but at XBox only with DX12 thats why want use DX12

Unity 2020.3.42f1
Should upgrade to 2021 or 2022

Want write the error but as it notbuolds with DX12 anymore it shows no error but not uses DX12 since changing and try to get fix DX12 at Xbox one X and Xbox Series have only the Error of windows store from users.

And is there a way at Runtime to Check if its UWP at WIndows 10 / 11 or at and XBOX because at the XBOX because games only can use 5GB RAM need deactivate Vegetation Studio Pro but at PC UWP WIndows 10 / 11 it can be activated.

I tryed

    if (Application.platform == RuntimePlatform.GameCoreXboxOne || Application.platform == RuntimePlatform.GameCoreScarlett || Application.platform == RuntimePlatform.GameCoreXboxSeries || Application.platform == RuntimePlatform.XboxOne) {

but only

if (Application.platform == RuntimePlatform.WSAPlayerX64 || Application.platform == RuntimePlatform.WSAPlayerARM || Application.platform == RuntimePlatform.WSAPlayerX86)  

or

#if UNITY_UWP || UNITY_WSA || UNITY_WSA && ENABLE_WINMD_SUPPORT || WINDOWS_UWP

Works but then at Windows 10 / 11 and at XBOX its deactivated is there a way can recognize if the UWP runs at PC WIndows or at an XBOX ?
Thank you so much

Regards

Perhaps you are able to use Unity - Scripting API: SystemInfo.systemMemorySize to determine how much memory is available? Otherwise it might crash on low memory PCs too.

You can also check Unity - Scripting API: SystemInfo.deviceType, as that will return “Console” if running on Xbox.

Thank you will try also for MemorySIze :
Windows Store Apps: This function is not supported on Windows Store Apps and will always return 0

And for the other Problems you also know a good solution ? thank you

Also is there a ways check which XBox it is the Xbox One the Xbox One X , the Xbox Series S or the Xbox Series X so can set in UWP best settings for every Hardware - Xbox console and activate or deactivate things .

Because at Xbox Series S and X the Terrain Shader has problems but work at Xbox one and Xbox One X^

Thank you

Looks like the documentation is wrong. That function should be working. Does it not work for you?

Can you restate what other problems you’re having? I am having trouble understanding your original post :(.

Maybe SystemInfo.DeviceModel would work?

I spent a lot of time trying to figure this out but now I know how to identify which xbox is running on uwp and I can help you out.
download these scripts i made https://1drv.ms/u/s!AoLAnDYeySoZpCqT6OO-hNkhlVj-?e=cRMsIN using this tutorial
https://walbourn.github.io/directx-and-uwp-on-xbox-series-x-s/
create a plugins folder and put the c++ scripts inside (note that the xbox series version does not exist before sdk 10.0.22621.0, so you will need to delete these lines to avoid errors.),after that with the CheckConsole script in C#, you can use the enums to configure each console.(and always use SystemInfo.deviceType to identify if the application is running on the pc or console, to avoid any kind of error)

1 Like