Download

Unreal Engine 4 is available for Win10 UWP app dev now

I am currently flummoxed by this one. Somehow your exe (remember the ‘real’ one is in Appx/{project}/Binaries/UWP64) doesn’t match the pdb. But if it’s not fixed by a rebuild and redeploy then I really don’t know what’s going on. Will update if I have any bright ideas.

This is the second time I’ve seen the Out of Memory error since upgrading to VS 15.2:

OutofMemory.jpg

I’ve followed up with those issues with on our private channel.

When attempting to build a UWP64 package within UE, I’m getting this error -



UATHelper: Packaging (UWP (x64-64bit)): signtool: SignTool Error: An unexpected internal error has occurred.
UATHelper: Packaging (UWP (x64-64bit)): CommandUtils.Run: Run: Took 219.665472s to run signtool.exe, ExitCode=1
UATHelper: Packaging (UWP (x64-64bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:1): C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe sign /a /f "D:\MyGame_416_uwp_merge\ueproject\Build\UWP\MyGame_temp_cert.pfx" /fd SHA256 "D:\MyGame_416_uwp_merge\uepr
oject\Saved\StagedBuilds\UWP64\MyGame.appx". See logfile for details: 'signtool-2017.07.20-17.48.26.txt' 


Seems my certificate is failing now. I’ve checked the certificate, and it’s issued to ‘No Publisher’. My uwp appxmanifest has Publisher=“CN=No Publisher” set in the identity tag. What other information might it be failing on?

This was working previously with 4.15.

The logfile mentioned should be in Engine\Programs\AutomationTool\Saved\Logs. What does it say? In particular is there an error code from signtool? Common cases are here.

Also, not sure what commit you’re on, but a fairly recent one added a button in the project settings UI that will generate a certificate for you. You might see if using that makes any difference.

Sorry, had read the details of the text file and saw that it implied that my ‘publisher’ field was incorrect. To clarify the contents are :



Done Adding Additional Store
Error information: "Error: SignerSign() failed." (-2147024885/0x8007000b)
SignTool Error: An unexpected internal error has occurred.

Thanks for the common cases link - I can see that the publisher didn’t match (I was missing the ‘O=’ section). Editing that to match will hopefully sort it.

Regarding the automatic certificate generation - I’m on the latest commit, but I don’t see the option in the project settings UI. Any reason it wouldn’t be available to me?

Ah, I see you’re way ahead of me. Publisher mismatch is indeed the normal reason for that error. Have you tried manually running SignTool with the debug option?



C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe sign **debug** /a /f "D:\MyGame_416_uwp_merge\ueproject\Build\UWP\MyGame_temp_cert.pfx" /fd SHA256 "D:\MyGame_416_uwp_merge\ueproject\Saved\StagedBuilds\UWP64\MyGame.appx


As for the generate button, it should be on the UWP page of project settings, in the packaging section, and look something like

5898459eff1f4ba1cac71daaaefef465f07656dd.png

Can’t think of any reason why it wouldn’t be there for you - it’s unconditionally added to the layout. I did realize while grabbing that for you that it’s a little fussy right now - you need to delete the existing .cer, .pvk and .pfx before it will work, and if you change publisher/identity/name you may need to close and reopen the settings window before trying to generate.

One last thing - I see you’ve changed the file name of the certificate in use (not Build/UWP/SigningCertificate.pfx). That ‘feature’ didn’t seem particularly useful, and wasn’t ever exposed through editor UI, so it’s gone in the latest and we just always use the default location. Don’t think that’s related to your current error since the command line to signtool indicates your custom location is in use, but it might become relevant as you try to make changes to pinpoint the problem.

@Sparkash - adding to what @jsyarrow wrote, the UWP Page is accessed by scrolling the side menu on the Project Settings page:

c0b6a0a4143a14e54488593fe62f58cea48ef28c.jpeg

And an example of my settings for a test project I have:

ce776491fd726cee8aed5aaab36187c32c0ad394.jpeg

@jsyarrow - Debugging is working again (Debug UWP64), and now I would like to add the XSAPI projects to the solution, have the built DLL’s and PDB copied into the appropriate directory. Is there a clean way of doing this?

Can I add the projects to my solution:



\Build\Microsoft.Xbox.Services.140.UWP.WinRT\Microsoft.Xbox.Services.140.UWP.WinRT.vcxproj
\External\cpprestsdk\Release\src\build\vs14.uwp\cpprestsdk140.uwp.vcxproj


Change the Output to be the original directory:



E:\UEUWP\MICROSOFT_UWP_UNREAL\Engine\Plugins\Online\XboxOne\OnlineSubsystemLive\ThirdParty\XSAPI\UWP.2017.07.20170710.01\lib\x64\v140\Release


Will this approach honor breakpoints? Given that the files (DLL, PDB) are copied to a different directory that may cause some confusion.

@Jerry.Richards - I would expect that to work. You may need to manually point the debugger at the pdb file as a one-off, but after that you shouldn’t have any trouble with breakpoints.

When I try to add a reference to the DLL projects, VS complains that different platforms are being targeted:

7f9dbc9dc05808eda45af8863babf30646a3c6f4.jpeg

But each platform is targeting x64:

44ca9e5646b6534195dc7709c60c1119c34c925e.jpeg

6bfef8beb50bc62051d85701bd8b6a90409b954b.jpeg

This may be trivial, and I’m trying to resolve it now, but as usual, any help/guidance you can provide is appreciated.

Using the Xbox Live Samples (https://github.com/Microsoft/xbox-live-samples), specifically the Leaderboard Sample, I am able to see the Stats manager working. I can write to and read from my game and sandbox:

LeaderboardSet.02.jpg

7ee42971fb99d2ebd20eefe9748e119e72e3637d.jpeg

The code being used within the UEUWP is very similar to that being used in the samples. However, there is a significant difference in the API usage, function names:

Samples



void Sample::SetStatForUser(
    _In_ std::shared_ptr<xbox::services::system::xbox_live_user> user,
    _In_ const string_t& statName,
    _In_ int64_t statValue)
{
    m_statsManager->set_stat_as_integer(user, statName, statValue);

    // Typically stats will be uploaded automatically
    // you should only request to flush when a game session or level ends.
    m_statsManager->request_flush_to_service(user, false);

    stringstream_t source;
    source << _T("Setting ");
    source << statName;
    source << _T(" to ");
    source << statValue;
    m_console->WriteLine(source.str().c_str());
}


And the code from UEUWP:



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;
}


Clearly the signatures are different, and I agree that the two sets of DLL’s should be performing the same task. But it is possible something else is happening.

Thanks for the image. My package settings are slightly different however. I’ve double checked and I’m definitely on the latest Github revision. Could my settings be stale for some reason?

Capture.PNG

What are the technical / coding hurdles for running UE4 on a Hololens?

Will we ever see UE4 for it? Is it UWP, the Hololens API or a mix of both to get it working? Are there any devs out there working on it already?

Don’t like to use Unity for an AR project. :wink:

@Jerry.Richards - the samples are written against the standard C++ version of XSAPI (headers + static lib, usable from C++ only), rather than its WinRT projection (winmd + dll, usable from any WinRT language). The appearance is slightly different because each version conforms to the typical style of its target platform, so XSAPI C++ looks rather like something you might see in std::, whereas XSAPI WinRT looks much like WinRT components in the Windows SDK. It is certainly possible that the difference is a source of bugs, but it’s not that one version is right and the other is wrong. OnlineSubsystemLive is set up to use the WinRT version, and switching would require substantial modifications to the existing code.

@Sparkash - that does look very much like an older version of the UI. The relevant code is mostly here. That should then get compiled into UE4Editor-UWPPlatformEditor.dll. Seems like there must be something stale somewhere there. That said, if you’ve got something working now it might not be worth tracking down the problem. The stuff you’re missing is primarily changes intended to make it easier to get started.

@MaSe87 - I’d recommend taking a look at the dev_MixedReality branch. There’s lots of work going on in there, but it should have some of the basics for developing a HoloLens app in place.

@jsyarrow - I’ve been testing with the xbox-live samples, and the xbox-live-winRT scenarios, which as you may know are two different codebases. The winRT tests are aligned with the UE UWP. From my testing, using MS code, I encountered three errors/problems with Stats. The first problem, oddly enough, affected the Leaderboard Results:



    LeaderboardQuery^ Query = ref new LeaderboardQuery();
    //Query->SkipResultToMe = true;
    Query->MaxItems = 100;
    Query->Order = SortOrder::Descending;
    mgr->GetLeaderboard(LiveContext->User, StatName, Query);


Uncomment the SkipResultToMe line and results are not returned.

Please check your Inbox for me info.

@jsyarrow - Do you by chance know how I would callback into the user code after getleaderboard values are returned?

Trying to compile, and I am getting the following message:

‘/FU’ requires an argument

7fe33fa7f0d999e078fac2a43512843b321911e9.png

I am running a fresh install of VS2015 U3.

I can successfully compile UE4 from github, but the UWP version is giving me this issue.

TIA!

**Update: ** Reverted to Visual Studio 2015 update 2, and applied Windows SDK 10.0.14393.795 suggested by @jsyarrow in a previous reply and successfully compiled :slight_smile:

For anyone that may be looking for an UE Leaderboard example the UE ShooterGame may be a good starting point. You can download it using the Epic Games Launcher, near the end of the Learn tab, under the Games section. A few example code snippets are below:



ShooterLeaderboars.h

// these are normally exported from platform-specific tools
#define LEADERBOARD_STAT_SCORE				"Score"
#define LEADERBOARD_STAT_KILLS				"Frags"
#define LEADERBOARD_STAT_DEATHS				"Deaths"
#define LEADERBOARD_STAT_MATCHESPLAYED		"MatchesPlayed"

/**
 *	'AllTime' leaderboard read object
 */
class FShooterAllTimeMatchResultsRead : public FOnlineLeaderboardRead
{
public:

	FShooterAllTimeMatchResultsRead()
	{
		// Default properties
		LeaderboardName = FName(TEXT("ShooterAllTimeMatchResults"));
		SortedColumn = LEADERBOARD_STAT_SCORE;

		// Define default columns
		new (ColumnMetadata) FColumnMetaData(LEADERBOARD_STAT_SCORE, EOnlineKeyValuePairDataType::Int32);
		new (ColumnMetadata) FColumnMetaData(LEADERBOARD_STAT_KILLS, EOnlineKeyValuePairDataType::Int32);
		new (ColumnMetadata) FColumnMetaData(LEADERBOARD_STAT_DEATHS, EOnlineKeyValuePairDataType::Int32);
		new (ColumnMetadata) FColumnMetaData(LEADERBOARD_STAT_MATCHESPLAYED, EOnlineKeyValuePairDataType::Int32);
	}
};

class FShooterAllTimeMatchResultsWrite : public FOnlineLeaderboardWrite
{
};




SShooterLeaderboard.cpp


void SShooterLeaderboard::ReadStats()
{
	StatRows.Reset();

	IOnlineSubsystem* const OnlineSub = IOnlineSubsystem::Get();
	if (OnlineSub)
	{
		IOnlineLeaderboardsPtr Leaderboards = OnlineSub->GetLeaderboardsInterface();
		if (Leaderboards.IsValid())
		{
			// We are about to read the stats. The delegate will set this to false once the read is complete.
			LeaderboardReadCompleteDelegateHandle = Leaderboards->AddOnLeaderboardReadCompleteDelegate_Handle(LeaderboardReadCompleteDelegate);
			bReadingStats = true;

			// There's no reason to request leaderboard requests while one is in progress, so only do it if there isn't one active.
			if (!IsLeaderboardReadInProgress())
			{
				ReadObject = MakeShareable(new FShooterAllTimeMatchResultsRead());
				FOnlineLeaderboardReadRef ReadObjectRef = ReadObject.ToSharedRef();
				bReadingStats = Leaderboards->ReadLeaderboardsForFriends(0, ReadObjectRef);
			}
		}
		else
		{
			// TODO: message the user?
		}
	}
}


Just wanted to give an update, that I was successfully able to compile the editor, and package my game into a UWP .appx.

I was also able to switch my Xbox One over to DevMode, and upload my game for play testing!

Thank you all so much for your posts, there were all a huge help!

Glad to learn of your success :slight_smile: