Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question UWP Windows and Xbox UWP Problems and need check which platform

Discussion in 'Windows' started by GamePyro-com, Feb 24, 2023.

  1. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    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 :(


    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


    Code (CSharp):
    1.     if (Application.platform == RuntimePlatform.GameCoreXboxOne || Application.platform == RuntimePlatform.GameCoreScarlett || Application.platform == RuntimePlatform.GameCoreXboxSeries || Application.platform == RuntimePlatform.XboxOne) {
    2.  
    3.  
    but only
    Code (CSharp):
    1. if (Application.platform == RuntimePlatform.WSAPlayerX64 || Application.platform == RuntimePlatform.WSAPlayerARM || Application.platform == RuntimePlatform.WSAPlayerX86)  
    2.  
    3. or
    4.  
    5. #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
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,718
  3. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    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
     
  4. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    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
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,718
    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?
     
  6. DiegoPlds

    DiegoPlds

    Joined:
    Aug 22, 2018
    Posts:
    24
    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)