The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[UWP][XBOX][Unity3D] Performance for Unity3D, UWP on the XBOX. RRS feed

  • General discussion

  • Hi everyone!

    I'd like to know if anyone has so far had any experiences with deploying a UWP app/game developed in Unity3d to the Xbox One. I sincerely hope I'm not falling outside of what is considered relevant for a discussion thread on this forum. Since I found no other threads when searching the forum, I thought perhaps other people might be interested in sharing their experiences. 

    I've had some luck when building both D3D and XAML based projects from Unity3d, and then using Visual Studio to build that project and deploy it to the Xbox One in Dev mode.

    Experiences I've had so far include:

    1. Deploying went just fine, very smooth indeed. Thanks Microsoft, I've been waiting for this!
    2. Attaching and debugging doesn't seem to work very well, but this seems to be an issue in general with UWP and Unity3d generated projects.
    3. Performance is awful. So far I haven't found any indication as to why this is, but I'm getting around 13 FPS on a simple project that runs fine (60 FPS) on a tired, old laptop with a built-in Intel card.
    4. Unity's UI components seem quite dodgy depending on which project type you select. So far, XAML has been the most stable.

    So... anyone tried and had any different experiences? Or perhaps the same?

    Cheers!

    Monday, April 4, 2016 7:19 PM

All replies

  • I might be very wrong but I thought UWP games wouldn't work too well on Xbox..that's what the Xbox side of the fence is for.

    http://pauliom.wordpress.com

    Monday, April 4, 2016 7:22 PM
  • You might be absolutely right. 

    But then again, if I view the Xbox as a Windows 10 device which can run UWP apps, then why not games... then why not run Unity based UWP games on it? Call it an interesting exercise if you will :)


    Monday, April 4, 2016 7:50 PM
  • We support both UWP apps *and* games. You should be able to run Unity UWP games on Xbox. You do need to take into account the resources that are available to UWP apps and games - see these links for more general information and resources:

    https://developer.microsoft.com/en-US/windows/windows-apps/uwp-on-xbox

    https://msdn.microsoft.com/windows/uwp/xbox-apps/index

    https://msdn.microsoft.com/windows/uwp/xbox-apps/system-resource-allocation

    thanks

    mark


    Monday, April 4, 2016 9:38 PM
    Moderator
  • Hi, while you do need to take into account the resources that are available to your game (see here), you should be able to run Unity based UWP games on you Xbox. In our testing to date, we have not seen the kind of performance problems that you are seeing.

    Please make sure that you are running x64 and a Release build (we know that Debug is very slow). If you are still seeing issues please can you share more details about what you are doing? If you have something that repro's the issue that you can share with us, that would be even better - it would allow us to investigate and see what is going on

    thanks

    mark

    Monday, April 4, 2016 9:43 PM
    Moderator
  • Mark, that seems like a contradictory statement. Those restrictions seem huge for a 3D game?

    http://pauliom.wordpress.com

    Tuesday, April 5, 2016 5:56 AM
  • Thank you Mark for your feedback running debug vs release mode.  I was noticing a slow down with XAML page loading.  I'll try release mode to see if that addresses performance.
    Tuesday, April 5, 2016 1:53 PM
  • We believe that there are many types games that will work with the available resources. But you are right that there are games that will not. If you are working on a game that requires access to the maximum potential of the Xbox One hardware, you can register with the ID@Xbox program to get access to Xbox One development kits and the tools required to access that full potential.

    The great thing (at least from my pov) is that UWP Dev Mode allows you to get started today. I think that there are lots of creative people out there who will be able to do amazing things within the available resources and I'm looking forward to seeing the kind of apps and games folks create.

    thanks

    mark


    Tuesday, April 5, 2016 2:42 PM
    Moderator
  • I'm glad this topic can be of interest to others as well!

    It turned out that the project Unity3d had generated had debug mode set on the main project even in release mode, so changing that should do it. Here's a few more things I ran into though, I'll leave it here in case anyone else comes across similar issues...

    The problem I was having was that I couldn't verify it as I suddenly couldn't run a Unity3d UWP build on the Xbox at all, no matter what project type I generate from Unity3d. Same project as yesterday, nothing changed (reverted from git) except for the fact that I had deployed it a few times. Tried several combinations of project settings that I know ran yesterday.

    I was getting an exception at initialization time, where

    appCallbacks = new AppCallbacks();
    throws a pretty unspecific COM Exception. 

    System.Runtime.InteropServices.COMException occurred
      ErrorCode=-2147024769
      HResult=-2147024769
      Message=The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
      Source=mscorlib
      StackTrace:
           at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
           at UnityPlayer.AppCallbacks..ctor()
           at Raketer.App..ctor()
      InnerException: 
    

    I had two separate issues causing this exception to be thrown. One turned out to be missing references for some Unity plugins. In other words, if you're having this sort of issue, make sure to check your implicit dependencies!

    The only thing that actually changed apart from that was that I installed the Windows 8.1 SDK for VS2015 (Community) and upgraded and deployed a different project to UWP in-between (non-Unity3d, ran fine and still does). Sounds like a far-fetched cause... But I found an old thread somewhere about a bugfix for VS2015 Update 5 where the emulator caused this very thing to happen on Windows Universal Apps, on Windows. I uninstalled the SDK, and immediately I could generate the project, build and run it without issue. 

    So, in the end, my framerate is now just fine and deployment + testing on the Xbox works as well as can be! 

    Cheers!

    Wednesday, April 6, 2016 7:44 PM
  • We are currently experiencing the same issue with a Unity app for not good reason performing slow in a Release or Master build through Visual Studio 2017 using the latest Windows 10 sdk and visual studio updates.. what gives? Are we the only people experiencing this issue? 

    A standalone.exe build of the game runs perfectly fine, well over 60.. UWP build drops almost below 10 and stays there. Very unusual - are we missing anything obvious here?

    Going to check a D3D build soon, our build is currently XAML for use of the touch keyboard opening feature and the app has lots of 3d scenes that can be explored.

    Rob

    Thursday, October 26, 2017 12:05 PM