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

    Okay, thank you. I'll look at it more tomorrow. Trying to convert it to VS2017 first since that's what I have installed. If that fails, I reinstall VS2015 and try again.

    Comment


      [MENTION=494622]jsyarrow[/MENTION] - I have a VS2017 solution setup for EraAdapter, and I can compile cleanly all the sources files, except one, Networking.cpp.

      Networking is referencing Windows::Networking::XboxLive namespace but I can't resolve it. I tried adding the reference
      Code:
      Windows.Networking.XboxLive.XboxLiveSecureSocketsContract
      but that didn't help, and the reference shows a caution icon next to it. Thinking that it was a compatibility issue, I tried adding it to a project with a wider range of support:
      Code:
      Build 15063
      Build 10240
      which showed the same caution icon after adding the reference. I was trying different from - to target combinations but VS2017 returned an HRESULT when trying to create the solution.

      For the EraAdapter project (15063 to 10586) the following references are present:
      Code:
      Windows.ApplicationModel.Calls.CallsVoipContract
      Windows.Devices.Printers.PrintersContract
      Windows.Foundation.FoundationContract
      Windows.Foundation.UniversalApiContract
      Windows.Graphics.Printing3D.Printing3DContract
      Windows.Networking.Connectivity.WwanContract
      Microsoft.Xbox.Services (from XSAPI path)
      Windows.Networking.XboxLive.XboxLiveSecureSocketsContract (warning icon)
      Xbox Live Extension SDK
      The other Contract references were added automatically after reopening the solution.

      Do you have any suggestions?
      Last edited by Jerry.Richards; 06-15-2017, 07:03 AM.

      Comment


        That reference should be part of the Xbox Live Extensions SDK which you will have installed thanks to the GetXboxLiveSDK script. Try removing both the broken Windows.Networking.XboxLive.XboxLiveSecureSocketsContract and the Xbox Live Extension SDK references, and then readding the latter (Add reference -> Extensions).

        Comment


          No improvement after performing the above steps.

          [EDIT]
          According to the link https://docs.microsoft.com/en-us/uwp...ive-extensions
          we should have the following contracts:

          Code:
          Windows.Gaming.XboxLive.StorageApiContract, version=1.0.
          Windows.Networking.XboxLive.XboxLiveSecureSocketsContract, version=1.0

          Unfortunately, I don't see either of them. How can I tell if my XboxLive is working or not? I can access the services from within UE4 but my separate project is having a problem. Is it a compiler switch?
          Last edited by Jerry.Richards; 06-15-2017, 03:56 PM.

          Comment


            [MENTION=494622]jsyarrow[/MENTION] - Well, I took different strategy and was able to open the EraAdapter project just by double-clicking on it. I modified the HintPath in the project file but still encountered the same error.

            Basically, I used VS2017 Open -> File -> Open With, selected XML (Text) Editor, replaced HintPath with:
            MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\Release\Microsoft.Xbox.Services.winmd

            Comment


              Ok, worked out what was going on. This is related to VS2017 picking up winmd references from a SDK-version-specific subfolder of Windows Kits\10\References, but the Live Extensions SDK doesn't put its winmds in that location.

              Try this: remove the existing broken reference, edit the project xml, and add a block like the below

              Code:
                  <Reference Include="Windows.Networking.XboxLive.XboxLiveSecureSocketsContract">
                    <HintPath>C:\Program Files (x86)\Windows Kits\10\References\Windows.Networking.XboxLive.XboxLiveSecureSocketsContract\1.0.0.0\Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd</HintPath>
                    <IsWinMDFile>true</IsWinMDFile>
                  </Reference>
              This references the winmd directly, rather than as an 'Extension SDK', and is working for me.

              (edit)
              ...your path to Microsoft.Xbox.Services.winmd above looks about right, but note these are two separate winmd references that are needed. Microsoft.Xbox.Services.winmd for sign-in, leaderboards, etc. And Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd for secure networking (not used in Creators Program, but required for EraAdapter to build).
              Last edited by jsyarrow; 06-15-2017, 04:27 PM.

              Comment


                That (the build) worked. I renamed the original dll and winmd to .dll.BAK and .winmd.BAK, then copied the newly generated into the same EraAdapter folder.

                So, taking a quick stab, I copied the new DLL to my game Binaries AppX folder, figuring that since it's just a DLL it should be replaceable. Now I'm running my game in Cook-on-the-Fly Debug mode.

                [EDIT]
                That (Login) worked. Now I have a valid PlayerId

                Now I just need to get the gamertag and image and display it. . .
                Last edited by Jerry.Richards; 06-15-2017, 04:46 PM.

                Comment


                  Getting the gamertag (IOnlineIdentity::GetPlayerNickname) was easy enough. Now I want to get the player's avatar.

                  Comment


                    [MENTION=494622]jsyarrow[/MENTION] - I am able to successfully logon, get the AppId, and get the gamertag. Unfortunately, I encountered a problem while trying to update leaderboard information. After gameplay, I try to get the FUniqueNetId from the IOnlineIdentity interface but it returns null:

                    Code:
                    bool UWPScores::WriteLeaderboard(. . .)
                    {
                        IOnlineSubsystem* oss = IOnlineSubsystem::Get();
                    
                        if (oss != nullptr)
                        {
                            IOnlineIdentity* iss = oss->GetIdentityInterface().Get();
                            if (iss != nullptr)
                            {
                                TSharedPtr<const FUniqueNetId> playerId = iss->GetUniquePlayerId(0);
                                if (!playerId.IsValid())
                                    return false;
                                :
                            }
                            :
                        }

                    In the above code PlayerId is always null. Possibly I made a mistake, others appear to use the same approach, I tried getting the PlayerId during the callback function when logging in:

                    Code:
                    void UMainMenuScreenWidget::LoginPlayerCallback(TSharedPtr<const FUniqueNetId> PlayerId, const int ControllerIndex)
                    {
                        if (PlayerId.IsValid())
                        {
                            IOnlineSubsystem* oss = IOnlineSubsystem::Get();
                            if (oss != nullptr)
                            {
                                IOnlineIdentity* iss = oss->GetIdentityInterface().Get();
                                if (iss != nullptr)
                                {
                                    TSharedPtr<const FUniqueNetId> tmpPlayerId = iss->GetUniquePlayerId(0);
                                    if (!tmpPlayerId.IsValid())
                                        GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Yellow, FString(TEXT("GetUniquePlayerId() failed ")));
                                }
                            }
                        }
                    }

                    In the login callback function, GetUniquePlayerId fails, tmpPlayerId is always null. Should this work? Should I be able to get the FUniqueNetId in both cases (during callback, and within my other function)?
                    Last edited by Jerry.Richards; 06-16-2017, 12:48 PM.

                    Comment


                      Okay, I see the issue with WriteLeaderboards, it isn't ready yet:

                      Code:
                      bool FOnlineLeaderboardsLive::WriteLeaderboards(const FName& SessionName, const FUniqueNetId& Player, FOnlineLeaderboardWrite& WriteObject)
                      {
                      	UNREFERENCED_PARAMETER(SessionName);
                      	UNREFERENCED_PARAMETER(Player);
                      	UNREFERENCED_PARAMETER(WriteObject);
                      	return false;
                      }

                      ReadLeaderboards is done but I don't know if that works or not. I'm going to look at sample code online and see if I can implement it quickly or not, meaning before anyone else does, unless it is being done by someone else.

                      Comment


                        For GetUniquePlayerId, do you have a game controller attached? The parameter name 'controller index' is literal in this case - comes from the code's original home on Xbox. On the whole I'd recommend stashing the net id that comes in as a callback parameter to sign in, and then (when possible) using the overloads of online methods that take in a net id.

                        The current approach to updating leaderboards is to submit events through the IOnlineEvents interface. The implementation is based on the technology described as 'Data Platform 2013' in the Xbox Live Docs. It may well need to be updated for Creators Program - I'm not aware of anyone doing that yet.

                        Comment


                          Originally posted by jsyarrow View Post
                          On the whole I'd recommend stashing the net id that comes in as a callback parameter to sign in, and then (when possible) using the overloads of online methods that take in a net id.
                          Yes, that is what I ended up doing.

                          Originally posted by jsyarrow View Post
                          The current approach to updating leaderboards is to submit events through the IOnlineEvents interface. The implementation is based on the technology described as 'Data Platform 2013' in the Xbox Live Docs. It may well need to be updated for Creators Program - I'm not aware of anyone doing that yet.

                          And here I was digging into both codebases (Epic, and MS). Are you able to refer me to any examples for IOnlineEvents? I'm searching now. . .

                          Comment


                            What are the event names?

                            Code:
                            /// The name of the event, and the names of the event fields (both dimensions and measurements), must match
                            /// the names declared in the title's service configuration. The names are case insensitive.

                            If I understand the comment correctly, event name is actually something I set in the Dev Center configuration portal. I'm giving it a try. . .
                            Last edited by Jerry.Richards; 06-16-2017, 04:24 PM.

                            Comment


                              Nothing appears on GameHub. Since I'm not certain of the syntax for the events, I've posted an issue on the Xbox Live SDK GitHub, and have the same question on the MSDN forums. Hopefully, someone will be able to help.

                              Comment


                                Hi All,
                                I was wondering if you could help, trying to setup the Holo lens to work with UE4.
                                So I have downloaded the MS_UWP_Fork, run the setup and generate the project file.
                                In Visual Studio I set the solution etc and select build and run the debugger.

                                No errors are reported but when I startup a UE4 project from visual studio the UWP tab does not appear in the project settings - platform tab??

                                Comment

                                Working...
                                X