Announcement

Collapse
No announcement yet.

Unreal Engine 4 is available for Win10 UWP app dev now

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    To run from VS you need to get content files into a location where the temporary deployment can read them. This can't be the standard UE directories since the UWP sandbox prevents access. Typically this means running an editor build to do cook-on-the-fly, and then pointing the UWP app at it to stream the content. To do so, you need to set some 'command line' parameters, which for UWP means dropping a UE4CommandLine.txt in your Binaries/UWPxx folder (this should automatically get copied into Binaries/UWPxx/AppX during deployment). You can borrow the UE4CommandLine.txt file that automation creates for you when running from the editor with cook-on-the-fly (it's in Saved/StagedBuilds/UWP), though it contains more than you need. The important portion is

    -filehostip=127.0.0.1
    You can also borrow the instance of the cook server that the editor spins up in order to provide the content.

    Alternatively you can pre-cook everything offline and then manually copy your cooked content into the Binaries/UWPxx/AppX location.

    All this is a good reminder that we still need a FAQ posted to GitHub.

    Comment


      ok, gotcha. How do I get the PDBs to load properly?

      Comment


        They're in the Binaries/UWPxx folder. If you hit Load Symbols and point the dialog at that path they should resolve. Should be a one-time thing; after that VS will remember the path for you.

        Comment


          Ok, so PDB loading is good now (thx!)

          The -filehostip method doesn't appear to be working?

          I made a whole new blank project, set it up, works 100% when launching from the editor, I run the cook server, Press F5 from the debugger, game connects to the cook server and streams some stuff, then a totally black screen.

          Link to project: https://www.dropbox.com/s/18mj8d6hvdrdwfz/UWP2.7z?dl=0
          Last edited by Zelex; 10-14-2016, 04:57 PM.

          Comment


            Are you sure it's connecting? AFAIK UWP apps cannot access localhost by default, you need to setup an exception for specific apps: https://msdn.microsoft.com/en-us/lib.../dn640582.aspx

            Comment


              yup logs show it connecting and transferring stuff.

              Comment


                Originally posted by manoelneto View Post
                Are you sure it's connecting? AFAIK UWP apps cannot access localhost by default, you need to setup an exception for specific apps: https://msdn.microsoft.com/en-us/lib.../dn640582.aspx
                Visual Studio automatically applies the exception when running under the debugger. There's a similar step in the AutomationTool implementation for UWP - see the end of UWPPlatform.Deploy.

                Originally posted by Zelex View Post
                I made a whole new blank project, set it up, works 100% when launching from the editor, I run the cook server, Press F5 from the debugger, game connects to the cook server and streams some stuff, then a totally black screen.
                I haven't looked at the actual project, but if you've got past the UWP splash screen and onto a black window then you've loaded *something*, probably the built-in Entry map. You might see whether you can open the debug console and load some other map, or take a look at the debug spew to see if it offers any clues.

                Comment


                  I've punted on the previous issue for the moment.

                  Currently trying to have a DLL be packaged via RuntimeDependencies so I can LoadPackagedLibrary() it. Anybody tried this before? Is the build system setup to work for this currently for UWP?

                  Comment


                    nevermind I think the answer is yes, it does work!

                    Comment


                      Alright, so far so good. Debugging was broken in this test because it was the entry map like you said.

                      I think there is a new gotcha though. Deploying is supposed to include the full contents of "Content/Movies" folder into the final package - however the UWPDeploy does not follow this rule. As such in-game movies do not work.

                      Comment


                        I was able to work around by adding

                        RuntimeDependencies.Add("$(ProjectDir)/Content/Movies/...", StagedFileType.UFS);

                        to my Build.cs

                        Comment


                          Finally got an ARM build to link properly!

                          Now to package a build and see which wonderful new crash messages I'll get on an actual Lumia 640. Ayy!

                          Click image for larger version

Name:	2016-11-01.png
Views:	1
Size:	182.3 KB
ID:	1117764

                          Comment


                            Ooh, nice work on the ARM build! Do let us know how it runs.

                            Comment


                              Does anyone tried out to make a build of a uwp game in ue4 for windows 10 mobile or only for xbox one?

                              Comment


                                Originally posted by jsyarrow View Post
                                Ooh, nice work on the ARM build! Do let us know how it runs.
                                I managed to install it on an actual device, and it crashes right away on launch (I fully expected this, since I know the RHI code will need a few tweaks to use D3d11 feature level 9_3), but I just hit an unexpected wall: I can't debug an installed package on the device, no matter what. There's no option to debug an installed package via USB in Visual Studio (only via direct deployment) and the remote debugging refuses to connect to the mobile device (after extensive googling, it doesn't seem to be supported on mobile).

                                I need to be able to at least have some idea of what is crashing before I can make the necessary changes, so this will slow me down a great deal until I can come up with a way to get at the very least an output log out from this thing.

                                -- EDIT --
                                I added a while(true) at the top of the main() function to halt the app before it does anything but it still closes as soon as I launch it (it should pause on the launch image). This means there's something wrong with the app package itself that prevents launch. I'll have to dig though the event viewer on the device to see if I can find any clues.
                                Last edited by manoelneto; 11-04-2016, 11:51 AM.

                                Comment

                                Working...
                                X