Search Unity

UWP build for XBox One needs custom URP

Discussion in 'Windows' started by outoftunegames, Mar 20, 2021.

  1. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    Hi there,

    If you build a UWP for XBox One that uses URP, many of the materials appear pink.

    This seems to be because URP on XBox One requires a separate package to be imported.

    https://docs.unity3d.com/Packages/c...versal@10.4/manual/Building-For-Consoles.html

    Getting access to this package isn't straightforward, and seems to require getting signed up as an official XBox developer, rather than being able to go down the UWP route.


    I could be wrong here, it would be great to get some clarification on whether UWP builds will support URP on XBox.
     
  2. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, sadly I have also the same problem, after upgrade of my project from built-in render pipeline to URP on xbox one I have a surprise, all is purple, and now ? Where to find the package to deploy UWP URP on Windows 10 and XBOX ONE ? Cheers...

    I'm using Unity 2020.3 and Visual Studio 2019

    PS: the Master UWP URP build on Windows 10 when the game start and after the splash screen all is white
     
    Last edited: Mar 22, 2021
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    You do not need special URP to use if you're deploying to Xbox One via UWP. Those are needed only if you're using the Xbox One build target in Unity (and you're a registered Xbox One developer).

    When building for UWP, you'd use the same URP version that you use for any other Unity platform. It's called "Universal Windows Platform" after all :).

    That is a totally separate issue. Is there anything interesting in the log file? Are you using D3D11 or D3D12?
     
  4. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hi, thanks in advance for your reply, seems that URP as UWP deployed on XBOX ONE and Windows 10 doesn't work, I have tried just now, can be the URP post processing stack that doesn't work ?

    I hear the game music and the game is running but all is white... on XBOX ONE I can see only the crowd sprites and all is purple, Cheers...
     
    Last edited: Apr 4, 2021
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you post the contents of the player log?

    Have you checked if the same thing happens if you use IL2CPP scripting backend on Windows Standalone player?
     
  6. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    Hi Tautvydas-Zilys,

    > You do not need special URP to use if you're deploying to Xbox One via UWP

    Thanks for the clarification that it's definitely not URP. I'll try a few things here at my end like IElectric, and see if we can collaboratively narrow down the issue.
     
  7. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    For reference, I've attached a screenshot showing our UWP game with URP running on Windows 10, and also another screenshot showing the same UWP game running on XBox One.

    Canvas ( 2D in 3D ) items seem to work, Shapes discs, and non-textured 3D models.
     

    Attached Files:

  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I'm very interested to see the player log. Magenta implies the shader failed to load.
     
    outoftunegames likes this.
  9. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    I’m only new to XBox dev - if you can send me instructions on how to get the log files from the XBox, I’ll send them over to you.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
  11. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It should be under LocalAppData, your game name and then TempState folder.
     
  13. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, on Windows 10 I have found my game log in C:\Users\...\AppData\Local\Packages\...\TempState

    My UWP game as URP on Windows 10 show a white screen when it start, on XBOX ONE a part of UI all is purple, the current published built in render pipeline UWP version on Microsoft Store build by Unity 2019.4.14 works properly both on Windows 10 and XBOX ONE.

    I don't know how to help to find the issue, the only thing is that I'm worked on a project imported from Unity 2019.4.14 to Unity 2020.3.0, thank you, Cheers...
     
    Last edited: Apr 4, 2021
  14. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    I added in a few extra donuts, and gave them URP shaders. They are the pink ones, the original / non-pink ones are using Toon/Basic

    XBoxOneVisualIssue.gif

    Here's the text from the log...

    Code (CSharp):
    1.  
    2. Logging to U:/Users/UserMgr1/AppData/Local/Packages/OutOfTuneGames.CrooksLikeUs_vg771w9m4ahse/TempState/UnityPlayer.log
    3. Module information:
    4. Built with Compiler Ver '192528614'
    5. Built from '2020.2/release' branch
    6. Version is '2020.2.4f1 (becced5a802b)'
    7. Master build
    8. Application type 'D3D'
    9. OS 'Windows 10 64bit'
    10. [Subsystems] Discovering subsystems at path S:/Program Files/WindowsApps/OutOfTuneGames.CrooksLikeUs_0.9.3.0_x64__vg771w9m4ahse/Data/UnitySubsystems
    11. GfxDevice: creating device client; threaded=1
    12. Direct3D:
    13.     Version:  Direct3D 11.0 [level 10.0]
    14.     Renderer: SraKmd (ID=0x0)
    15.     Vendor:  
    16.     VRAM:     256 MB
    17. Initialize engine version: 2020.2.4f1 (becced5a802b)
    18. D3D11 device created for Microsoft Media Foundation video decoding.
    19. New input system (experimental) initialized
    20. UnloadTime: 5.151973 ms
    21. Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    22. UnloadTime: 4.838068 ms
    23.  
    24. Unloading 17 unused Assets to reduce memory usage. Loaded Objects now: 9519.
    25. Total: 73.587392 ms (FindLiveObjects: 2.290191 ms CreateObjectMapping: 1.237722 ms MarkObjects: 69.671888 ms  DeleteObjects: 0.384346 ms)
    26.  
    27. Setting up 2 worker threads for Enlighten.
    28.   Thread -> id: 1560 -> priority: 1
    29.   Thread -> id: bd8 -> priority: 1
    30.  
     

    Attached Files:

  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Let me reach out to URP devs to ask them about whether they've seen anything like this. Can you report a bug in the meantime?
     
  16. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Last edited: Mar 23, 2021
  17. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    I just put together a simple test scene scene and reported it - I dm'd you the link.

    > You should just be able to update to URP 10.4 via the package manager.

    Even with preview packages on, I can't see URP 10.4 ( Unity 2020.2.4f1 ), the latest I'm seeing ( which was the default one installed ) was URP 10.3.2

    Does it take a while to roll out the packages to Europe?
     
  18. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
  19. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    > URP 10.4

    The minimum requirement for URP 10.4 is Unity 2020.3, I'm dl-ing it now to test :)
     
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Yeah I was about to say, you need Unity 2020.3!

    And yes, it sounds like exactly the same issue for Intel HD 2000.
     
  21. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    The situation on the XBox has drastically improved - the donuts are working in the simple scene! :D

    But it looks like some of the depth issues are still there. It looks like the character is occluded, the Start Game should be solid. :eek:

    You can play the WebGL version of the game online to see what it should look like here for reference o_O

    https://out-of-tune-games.itch.io/crooks-like-us

    XBoxOne_URP_Update.jpg
     
  22. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    CF909E25-80F5-4AC5-B408-013DF8A493CA.jpeg Here's another image of the game, from the overhead cam. By comparing the WebGL version and this, the devs might get some clues.

    I'll list a few differences I see...
    - The van is inverted
    - There grey line on the right shouldn't be there
    - The character has an occlusion shader which shows up white when it's behind another opaque model. It seems to think it's behind something in the screenshot, but it's not. Note that the skinned character mesh renders fine in the menu scene, as part of the customisation.
    - The upstairs is missing
    - Around the podium ( 1st/2nd/3rd ), some very strange culling is going on!
    - Spinning Start Game should be solid.

    Hope that helps - we are definitely getting closer!
     
    Last edited: Mar 24, 2021
  23. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you report bugs for these issues? I'm not a graphics programmer so my understanding of these things are pretty limited.
     
  24. outoftunegames

    outoftunegames

    Joined:
    May 28, 2020
    Posts:
    18
    I forgot to upload the 2nd image above, I just edited the post.

    I will get time over the next few days to put together another demo scene showing these issues, I need to get some actual game dev work done now to pay the bills - I’ve lost a few days to this bug lol
     
  25. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, I have updated my project to Unity 2020.3.1 and update URP package to 10.4 but after build UWP version and start the videogame on Windows 10 all is white, the screen still show white but the game music is played, input works but graphic doesn't work.

    I do not understand what's happening, thank you, Cheers...
     
    Last edited: Apr 4, 2021
  26. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, I'm using the Unity 2020.3.1 personal edition and I have observed that in the UWP game on Windows 10, after the game icon appear, the Unity LOGO splash screen isn't shown, the screen is always white and by ALT+TAB key is not possible to switch to another application, can be useful to find the issue ? Thank you, Cheers...
     
    Last edited: Mar 25, 2021
  27. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    Just an update - I was able to send a project showing the issue, and it was confirmed. I'm just waiting now to see if it gets fixed in the next public update.
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    And just to be specific about the issue, it's the "Polybrush/Universal Render Pipeline/Lit Vertex Color" shader that isn't working on Xbox: objects using it are rendered incorrectly.
     
  29. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    I wasn't made aware that that was the issue, so thanks for sharing that. I can certainly try at my end to see if changing that fixes it when I get some free time to change it and do a full rebuild to the XBox One, and will report back.
     
  30. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    @Tautvydas-Zilys did the shader ever get on a list to get fixed? I just did a test with the latest 2020.3.x version of Unity, and am seeing the same issue. If there was a hint as to how I could fix the shader myself ( similar to how the other shaders were fixed, that were broke - I'm thinking something went wrong with the depth pass or similar ), it would be great to know so that I could give it a go here, and pass the info back if it worked.
     
  31. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It seems the problem is with MSAA on D3D11 Feature Level 10.1. Specifically, this call here:

    https://github.com/Unity-Technologi...l/Runtime/UniversalRenderPipelineCore.cs#L577

    Code (csharp):
    1. desc.msaaSamples = SystemInfo.GetRenderTextureSupportedMSAASampleCount(desc);
    Unity seems to misdetect supported MSAA level, but fails to actually render using it. We're still investigating whether we can make it work, but there are possible workarounds you can do:

    1. Disable MSAA
    2. Switch to DirectX 12
     
    outoftunegames likes this.
  32. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    Many thanks @Tautvydas-Zilys

    Switching to DirectX 12 didn't work, but disabling MSAA did.

    I created this script that other devs can drop onto a game object in their loading scene, in order to turn off MSAA just on the XBox One UWP platform, it works great here for us.



    using UnityEngine;
    using UnityEngine.Rendering.Universal;

    public class XBoxOne_UWP_Fix : MonoBehaviour
    {
    public UniversalRenderPipelineAsset pipeline;

    void Awake()
    {
    CheckForXBoxOneUWPAndApplyURPFix();
    }

    void CheckForXBoxOneUWPAndApplyURPFix()
    {
    if (SystemInfo.deviceType == DeviceType.Console)
    {
    if(Application.platform == RuntimePlatform.WSAPlayerX64)
    {
    pipeline.msaaSampleCount = 1;
    }
    }
    }
    }