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

  • replied
    Originally posted by jsyarrow View Post
    To log out you can use the Windows 10 Xbox app. After logging out there and then relaunching your game it should trigger the UI again.
    That is a nice one


    Originally posted by jsyarrow View Post
    As for exceptions, note that there are some internal retry paths where the Xbox Live SDK code may throw an exception, catch it itself, and ultimately return a successful result from an API.
    Okay, that is useful information.


    Originally posted by jsyarrow View Post
    Though if you're getting a null user id it sounds as though this isn't one of those cases.
    I'll try to track this down, without this working, I can't use the services.


    Btw, the packaging worked too.

    Leave a comment:


  • replied
    Hurrah!

    That summary looks right to me. I will make sure to apply those changes next time I have a chance to get the fork updated. Thanks again for working through them with me, and your patience!

    To log out you can use the Windows 10 Xbox app. After logging out there and then relaunching your game it should trigger the UI again. There is also a method in the core Xbox Live SDK that supports changing user in-game, but there's no wrapper for it in OnlineSubsystemLive currently.

    As for exceptions, note that there are some internal retry paths where the Xbox Live SDK code may throw an exception, catch it itself, and ultimately return a successful result from an API. Though if you're getting a null user id it sounds as though this isn't one of those cases.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - After logging in, an exception was thrown in UWP code. I'm not exactly sure where, as I continued my application wanting to see if my callback was called. It was, but PlayerId was null.

    Unfortunately I'm not able to login again, the call to ShowLoginUI is ignored, even after stopping and restarting the debugger, the UI is not displayed.

    Do I need to Logout first?
    Is there a way to always show the UI so that players can change to a different gamertag?

    [EDIT]
    Even after a complete reboot the UI doesn't show. Is it that since I'm already logged in the Xbox Live services already know the account info?

    Unfortunately PlayerId is still null
    Last edited by Jerry.Richards; 06-14-2017, 06:24 PM.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - success:

    Click image for larger version

Name:	XSSuccess.jpg
Views:	1
Size:	51.6 KB
ID:	1129505


    What have I learned from this exercise:

    Code:
    1. Microsoft Server is way, way, way out :D
    2. We need the latest $xsapiVersionUwp = "2017.05.20170517.001"
    3. A change to Install-LivePackage is needed:
    	$nativeReleasePackage = $installLocation + "\" + $packageName + ".Native.Release." + $packageVersion
    	if (Test-Path $nativeReleasePackage)
    	{
    		$actualPath = $nativeReleasePackage
    	}
    	else
    	{
    		$actualPath = $installLocation + "\" + $packageName + "." + $packageVersion
    	}
    4. OnlineSubsystemLive.build.cs needs to be changed:
    	const string CppRestVersion = "2_9";

    Did I miss anything for this part of it?

    Leave a comment:


  • replied
    Does that imply the change to build.cs will fix the packaging issue too?

    Leave a comment:


  • replied
    That dll is manually loaded (since it's in an odd path), so the filename matters. You could rename your manual copy . Alternatively there's a hard reference to cpprest_140_2_8.dll in OnlineSubsystemLive.build.cs. If you change that to 2_9 and build (shouldn't need a full rebuild, just incremental) then that will get the new version packaged and loaded in the 'proper' way.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - IOnlineSubsystem::Get() is returning null when running from the debugger:

    Code:
    IOnlineSubsystem* oss = IOnlineSubsystem::Get();
    if (oss != nullptr)
    {
        IOnlineExternalUI* pUI = oss->GetExternalUIInterface().Get();
        if (pUI != nullptr)
        {
            LoginPlayerCallbackDelegate.BindUObject(this, &UMyWidget::LoginPlayerCallback);
            pUI->ShowLoginUI(0, true, LoginPlayerCallbackDelegate);
        }
    }

    Thinking that it needed the DLL's I manually copied the files:

    Code:
    From:
    Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\Release
    
    To:
    Binaries\UWP64\AppX\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\release
    But that didn't work either.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - I got an Unknown Error:

    Code:
    UATHelper: Packaging (UWP (x64-64bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException:
    Failed to copy
    Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\release\cpprest140_uwp_2_8.dll 
    to
    Saved\StagedBuilds\UWP64\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\release\cpprest140_uwp_2_8.dll

    The directory contains

    Code:
    Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP\build\native\lib\x64\v140\Release\cpprest140_uwp_2_9.dll

    I'm trying UWP64 Debug with Cook-on-the-Fly to see if the login works, irrespective of the packaging problem.
    Last edited by Jerry.Richards; 06-14-2017, 04:38 PM.

    Leave a comment:


  • replied
    Originally posted by jsyarrow View Post
    OnlineSubsystemUtils is probably a good idea - in particular it contains the platform-independent Blueprint interface to the OnlineSubsystem. But if your build succeeds without it then it's not essential - it certainly isn't related to your sign-in problem.
    Got it. I'm packaging now (UWP64).

    Leave a comment:


  • replied
    OnlineSubsystemUtils is probably a good idea - in particular it contains the platform-independent Blueprint interface to the OnlineSubsystem. But if your build succeeds without it then it's not essential - it certainly isn't related to your sign-in problem.

    Leave a comment:


  • replied
    [MENTION=494622]jsyarrow[/MENTION] - Would you please clarify (again) if OnlineSubsystemUtils is needed or not. It was my understanding that it wasn't needed and so I don't have the plugin enabled. However, the OnlineSubsystemLive.Build.cs includes it:

    Click image for larger version

Name:	03.OnlineSubsystemUtils.jpg
Views:	1
Size:	32.6 KB
ID:	1129500


    Should this be enabled?
    Last edited by Jerry.Richards; 06-14-2017, 03:11 PM.

    Leave a comment:


  • replied
    I'm testing the change now. Is it okay to clean the previous build, run the modified script, and the rebuild?

    [EDIT]
    I decided to start completely from scratch, and this is the process I'm following:

    Code:
    1. Delete existing directory
    2. Clone from GitHub
    3. Copy Plugins/Marketplace
    4. Run Setup.bat
    5. Change GetXboxLiveSDK $xsapiVersionUwp = "2017.05.20170517.001"
    6. Change GetXboxLiveSDK Install-LivePackage:
    	$nativeReleasePackage = $installLocation + "\" + $packageName + ".Native.Release." + $packageVersion
    	if (Test-Path $nativeReleasePackage)
    	{
    		$actualPath = $nativeReleasePackage
    	}
    	else
    	{
    		$actualPath = $installLocation + "\" + $packageName + "." + $packageVersion
    	}
    7. Run GetXboxLiveSDK script
    8. Run GenerateProjectFiles
    9. Build

    I'm on step 9 without error so far. . .
    Last edited by Jerry.Richards; 06-14-2017, 02:20 PM.

    Leave a comment:


  • replied
    Yes, that message is directly related to your build errors. It's generated when the OnlineSubsystemLive.build.cs can't find the Microsoft.Xbox.Services.winmd file, which is needed to resolve the references to WinRT types in Microsoft::Xbox::Services.

    Looks like this is because the structure of the NuGet package has changed recently, and the GetXboxLiveSDK script needs changing to match. Maybe a change to the way 'actualPath' is formed inside Install-LivePackage?

    Code:
    	$nativeReleasePackage = $installLocation + "\" + $packageName + ".Native.Release." + $packageVersion
    	if (Test-Path $nativeReleasePackage)
    	{
    		$actualPath = $nativeReleasePackage
    	}
    	else
    	{
    		$actualPath = $installLocation + "\" + $packageName + "." + $packageVersion
    	}
    Still haven't had a chance to fully test this myself though.

    Leave a comment:


  • replied
    After downloading the source, I ran setup, then executed the GetXboxLiveSDK script with the newer version. When I ran GenerateProjectFiles it reported that the SDK wasn't installed:

    Click image for larger version

Name:	XboxLiveFalseError.jpg
Views:	1
Size:	31.7 KB
ID:	1129483

    But the Microsoft.Xbox.Live.SDK.<> directories are present. Is this a false error or is it the source of my problem with the new SDK?

    [EDIT]
    The phrase only occurs in OnlineSubsystemLive.Build.cs:

    Code:
    string NugetPathChunk = Path.Combine(PackageFolder, "build", "native", PlatformArchAndCompilerPathChunk, "release");
    
    string XSAPISubDir = Path.Combine("XSAPI", NugetPathChunk);
    if (!AddWinRTDllReference(XSAPISubDir, "Microsoft.Xbox.Services"))
    {
    	Log.TraceError("Error: Xbox Live SDK not found.  Run Engine/Plugins/Online/XboxOne/OnlineSubsystemLive/GetXboxLiveSDK.bat");
    }

    The build of the Engine is successful.
    The project DLL's are created without error.
    The Editor and operates as normal.
    Visual Studio Solution is created.
    Build and Debugging works with Win64 Development Editor.
    Last edited by Jerry.Richards; 06-14-2017, 01:43 PM.

    Leave a comment:


  • replied
    The packaging didn't work with the new SDK. Given the nature of the errors it may only work with UWP configurations. I'm trying Debug UWP64 now.

    Code:
    UATHelper: Packaging (UWP (x64-64bit)): UnrealBuildTool: E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\Source\Public\OnlineSubsystemLive.h(28): error C3083: 'Xbox': the symbol to the left of a '::' must be a type
    UATHelper: Packaging (UWP (x64-64bit)): UnrealBuildTool: E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\Source\Public\OnlineSubsystemLive.h(28): error C3083: 'Services': the symbol to the left of a '::' must be a type
    UATHelper: Packaging (UWP (x64-64bit)): UnrealBuildTool: E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\Source\Public\OnlineSubsystemLive.h(28): error C3083: 'System': the symbol to the left of a '::' must be a type
    UATHelper: Packaging (UWP (x64-64bit)): UnrealBuildTool: E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\Source\Public\OnlineSubsystemLive.h(28): error C2039: 'GetTokenAndSignatureResult': is not a member of 'Microsoft'
    [EDIT]
    Well the Debug UWP64 didn't work with the latest XSAPI SDK.
    Last edited by Jerry.Richards; 06-13-2017, 11:15 PM.

    Leave a comment:

Working...
X