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

    Hi.

    Does anyone know if the Microsoft fork of UE works on PC or will only work on Xbox?

    Comment


      Originally posted by xmak View Post
      Hi.

      Does anyone know if the Microsoft fork of UE works on PC or will only work on Xbox?
      It works with both using the Universal Windows Platform (UWP). With that said, I am developing and testing on a Windows 10 machine, but expect it to work on the Xbox One too.

      Comment


        [MENTION=494622]jsyarrow[/MENTION] - With 4.16.x I'm having a UWP64 Debug build problem that wasn't present in the 4.15.x version:

        Code:
        22>Parameter name: path
        22>   at System.IO.Path.GetFullPathInternal(String path)
        22>   at System.IO.Path.GetFullPath(String path)
        22>   at UnrealBuildTool.DirectoryReference..ctor(String InPath) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\System\DirectoryReference.cs:line 21
        22>   at UnrealBuildTool.UWPManifestGenerator.CreateManifest(UnrealTargetPlatform TargetPlatform, String InOutputPath, String InIntermediatePath, FileReference InProjectFile, String InProjectDirectory, List`1 InTargetConfigs, List`1 InExecutables, IEnumerable`1 InWinMDReferences) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\UWP\ManifestGenerator.cs:line 688
        22>   at UnrealBuildTool.UWPDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, List`1 TargetConfigurations, List`1 ExecutablePaths, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\UWP\UWPDeploy.cs:line 196
        22>   at UnrealBuildTool.UWPDeploy.PrepTargetForDeployment(UEBuildDeployTarget InTarget) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\UWP\UWPDeploy.cs:line 274
        22>   at UnrealBuildTool.UniversalWindowsPlatform.Deploy(UEBuildDeployTarget Target) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\UWP\UEBuildUWP.cs:line 233
        22>   at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile) in E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Source\Programs\UnrealBuildTool\System\UnrealBuildTool.cs:line 1623
        22>Total build time: 427.02 seconds (Local executor: 406.20 seconds)
        This has been reported in GitHub too. Do you have any suggestions I can try?

        I'm studying the build code now but hoping that you can point me in the right direction.

        [EDIT]
        When I do get a build and while running the debugger a missing project is reported:

        Click image for larger version

Name:	MissingProject.jpg
Views:	1
Size:	20.2 KB
ID:	1130612
        Last edited by Jerry.Richards; 07-04-2017, 01:06 PM.

        Comment


          [MENTION=494622]jsyarrow[/MENTION] - Yes, you're right, our project name is different than the folder name. Updating fixed that error.

          Unfortunately I'm now getting the same 'descriptor file' error that Jerry has reported above. I did manage to fix it by comparing the generated GameDir functionality on Win64 and noticed that the 'CheckLocal' and CheckGame' variables in FGenericPlatformMisc::GameDir() should probably be the same. On UWP the 'CheckLocal' variable seems to have an erroneous additional Appx folder in it's path (two in a row). By hardcoding a fix there, and thus setting my GameDir to LocalGameDir, I was able to get past the uproject load error. Unfortunately I then hit a path failure in one of my plugins. I can provide more detail if required, but it appears that pathing on the current UWP build isn't quite correct just yet.

          Comment


            [MENTION=828801]Sparkash[/MENTION] [MENTION=5350]Jerry.Richards[/MENTION] - thanks for the detailed error reports. That narrowed it down pretty quickly - we'd picked up a dependency on the project file being provided on the command line (as happens when run via UAT, but not by default in VS). The project file problem is fixed in the latest; with any luck that will address the problem with the plugin paths too.

            The build issue in the ManifestGenerator (occurs when building the UE4 project without a specific game project) should be dealt with too. The PDBCopy issue still needs some work.

            Comment


              [MENTION=494622]jsyarrow[/MENTION] - I'm happy to report that the change worked and I am now able to Debug UWP64 projects. Thank you for the help.

              Now. . . what is the best way to make use of the Stats Manager API that you mentioned above?

              I cannot access the stats namespace:

              Code:
              using namespace Microsoft::Xbox::Services::Stats::Manager;

              Does this go back to the EraAdapter problem?

              I can access other namespaces:

              Code:
              using namespace Microsoft::Xbox::Services;
              using namespace Microsoft::Xbox::Services::Achievements;
              using namespace Microsoft::Xbox::Services::Leaderboard;
              using namespace Microsoft::Xbox::Services::Statistics;
              using namespace Microsoft::Xbox::Services::Statistics::Manager;
              I do see a change for the renaming:

              https://github.com/Microsoft/xbox-li...6b37ea4d7f0e39
              Attached Files
              Last edited by Jerry.Richards; 07-06-2017, 01:25 PM.

              Comment


                Great, that update fixed all my pathing issues. Thanks!

                Comment


                  Originally posted by Jerry.Richards View Post
                  I cannot access the stats namespace:
                  You do indeed want the types in Microsoft::Xbox::Services::Statistics::Manager. Looks like the name change is part of the WinRT projection. Sorry for the confusion.

                  Comment


                    StatisticManager::SetStatisticIntegerData throws a "User not found in local map" exception:

                    Click image for larger version

Name:	UserNotFound.jpg
Views:	1
Size:	76.3 KB
ID:	1130769

                    The code is fairly straightforward:

                    Code:
                    bool FOnlineLeaderboardsLive::WriteLeaderboards(const FName& SessionName, const FUniqueNetId& PlayerId, FOnlineLeaderboardWrite& WriteObject)
                    {
                    	UNREFERENCED_PARAMETER(SessionName);
                    
                        if (!LiveSubsystem)
                            return false;
                    
                        const FOnlineIdentityLivePtr Identity = LiveSubsystem->GetIdentityLive();
                        if (!Identity.IsValid())
                            return false;
                    
                        const FUniqueNetIdLive UserLive(PlayerId);
                        Windows::Xbox::System::User^ XBoxUser = Identity->GetUserForUniqueNetId(UserLive);
                    
                        Microsoft::Xbox::Services::XboxLiveContext^ LiveContext = LiveSubsystem->GetLiveContext(XBoxUser);
                        if (LiveContext == nullptr)
                            return false;
                    
                        Microsoft::Xbox::Services::Statistics::Manager::StatisticManager^ mgr = Microsoft::Xbox::Services::Statistics::Manager::StatisticManager::SingletonInstance;
                        if (mgr != nullptr)
                        {
                            for (FStatPropertyArray::TConstIterator item(WriteObject.Properties); item; ++item)
                            {
                                Platform::String^ itemName = ref new Platform::String(*item->Key.GetPlainNameString());
                    
                                int32 itemValue;
                                item->Value.GetValue(itemValue);
                    
                                long long llValue;
                                llValue = itemValue;
                    
                                mgr->SetStatisticIntegerData(LiveContext->User, itemName, llValue);
                            }
                    
                            mgr->RequestFlushToService(LiveContext->User);
                    
                            return true;
                        }
                    
                    	return false;
                    }

                    Am I using the call to GetLiveContext with the user correctly?
                    I've also tried using LiveSubsystem->GetDefaultLiveContext() but that didn't work either.

                    Any help is appreciated.

                    Comment


                      I haven't had a chance to play with the new StatisticsManager API yet, but from a quick look at the header I'd guess you're missing a call to AddLocalUser.

                      Also make sure that you're regularly calling the DoWork method, probably from a Tick method on FOnlineLeaderboardsLive.

                      The SocialManager-based implementation of FOnlineFriendsLive might be a decent example of how to deal with these manager objects.

                      Comment


                        Originally posted by jsyarrow View Post
                        I haven't had a chance to play with the new StatisticsManager API yet, but from a quick look at the header I'd guess you're missing a call to AddLocalUser.
                        Adding the call to AddLocalUser did fix the problem. I might not be performing it at the most optimal location but it did stop the exception from occurring.

                        Originally posted by jsyarrow View Post
                        Also make sure that you're regularly calling the DoWork method, probably from a Tick method on FOnlineLeaderboardsLive.
                        FOnlineLeaderboardsLive doesn't inherit from a tickable component, which we might have to include if calling DoWork is needed.


                        Btw, where would I see the posting? I don't see anything in the Xbox Live portal on my Windows machine nor anywhere on the Dev Portal.

                        Comment


                          [MENTION=494622]jsyarrow[/MENTION] - As mentioned above, I added FTickableGameObject to the FOnlineLeaderboardsLive class, along with a couple of other support functions:

                          Code:
                          class FOnlineLeaderboardsLive : public IOnlineLeaderboards, public FTickableGameObject
                          {
                          public:
                          
                              virtual void Tick(float DeltaTime) override;
                              virtual bool IsTickable(void) const override;
                              virtual TStatId GetStatId(void) const override;
                          }
                          
                          
                          bool FOnlineLeaderboardsLive::IsTickable(void) const
                          {
                              return true;
                          }
                          
                          
                          TStatId FOnlineLeaderboardsLive::GetStatId(void) const
                          {
                              static TStatId statId;
                              return statId;
                          }
                          
                          
                          void FOnlineLeaderboardsLive::Tick(float DeltaTime)
                          {
                              Microsoft::Xbox::Services::Statistics::Manager::StatisticManager^ mgr = Microsoft::Xbox::Services::Statistics::Manager::StatisticManager::SingletonInstance;
                              if (mgr != nullptr)
                                  mgr->DoWork();
                          }
                          The class does tick and DoWork is called with each tick (maybe not with some exclusions, such as it's not ready).

                          With that should I be able to see my Leaderboard updates (assuming I did it correctly)?


                          [EDIT]
                          According to the content on this page:

                          https://developer.microsoft.com/en-u...ve-experiences

                          the stats should be visible on the Xbox One dashboard, and on the Xbox app on Windows 10. Unfortunately I don't see it. I've been re-reading several pages with no luck seeing the stat:

                          https://developer.microsoft.com/en-u.../data-platform
                          https://developer.microsoft.com/en-u...7/player-stats
                          https://developer.microsoft.com/en-u...stats-updating

                          Is there a difference between the C# (https://github.com/Microsoft/xbox-live-api-csharp) and C++ (https://github.com/Microsoft/xbox-live-samples) API's?

                          This may be a dumb question. . .but could I be inadvertently using the wrong libs/dlls? I would think that the underlying call to the service would be the same though regardless of which was used.

                          [MENTION=494622]jsyarrow[/MENTION] - I don't think the update to the leaderboard/achievements is working. I read the documentation and my settings look right but I don't see any indication on the Xbox for Windows 10 Achievements. Are you able to investigate this on your side?
                          Last edited by Jerry.Richards; 07-08-2017, 10:56 AM.

                          Comment


                            [MENTION=494622]jsyarrow[/MENTION] - I'm hoping not to get too far ahead as there a couple of other issues that I noted.

                            Now I'm trying to test on the Xbox One but unfortunately the Xbox Device Portal deployment fails. Is there an FTP option available?

                            Click image for larger version

Name:	03.Deployment.01.jpg
Views:	1
Size:	86.3 KB
ID:	1130818

                            Comment


                              [MENTION=494622]jsyarrow[/MENTION] - A smaller application size worked. I was able to build and deploy the UWP Third Person sample onto my Xbox:

                              Click image for larger version

Name:	99.XboxTestInstall.02.jpg
Views:	1
Size:	71.5 KB
ID:	1130864


                              And running on the Xbox:

                              Click image for larger version

Name:	99.XboxTestInstall.03.jpg
Views:	1
Size:	242.2 KB
ID:	1130865


                              This confirms (mostly) that my steps are correct, and my setup is working.

                              The test game size is: 85.4 MB
                              The actual game size is: 3.53 GB

                              When I try to deploy my game the Xbox Device Portal timesout. Is there something I can do?

                              [EDIT]
                              With Windows Explorer I can copy my AppX file but I don't know where it should be copied to and how to install it (yet):

                              Click image for larger version

Name:	WindowsExplorer.jpg
Views:	1
Size:	61.0 KB
ID:	1130891


                              [EDIT]
                              Using Register a game from a shared network location on the Xbox One Dev Mode console I am able to install my game, which is 3.53GB in size.

                              For those that may not know, this is a two step process:

                              1. Share the folder:
                              a. From Windows Explorer right-click the folder name and select Share with and Specific people...

                              Click image for larger version

Name:	ShareFolder.jpg
Views:	1
Size:	46.0 KB
ID:	1130900

                              2. Enter the needed location and credentials on the Xbox One:
                              a. Select Register a game from a shared network location
                              b. At the Add a network share screen enter the location to the AppX manifest, for example, \\COMPUTERNAME\Releases\2017.07.08.UWP\LongshotHero
                              c. At the Username enter: COMPUTERNAME\username, and password
                              Last edited by Jerry.Richards; 07-10-2017, 01:17 PM.

                              Comment


                                A few ideas on the stats update:
                                - Make sure you've checked the box to 'Feature on players' profiles'
                                - If you're not already, you should capture and process the returned events from the DoWork call on the StatisticsManager. These might provide some clue if there's an error encountered.
                                - Try retrieving the leaderboards in your own code - this will be the only way to display global leaderboards in any case, since the dash/Xbox App focuses on social.

                                You beat me to it on deployment to Xbox. There are indeed some limitations on package size at the moment, and using a network share or deploying loose files are the best options for working around them.

                                Comment

                                Working...
                                X