Forum Discussion
DanielJones
10 years agoExplorer
Would really appreciate some help with Entitlement checks for Unreal Engine.
Hello! I'm having some issues with including the now required entitlement checks in my UE4 project.
I am following the steps outlined here: https://developer3.oculus.com/docume...m-walkthrough/
1. I've went into the DefaultEngine.ini file and added the necessary code as shown below, replacing the "OculusAppID" with my own App ID.
[OnlineSubsystem]
DefaultPlatformService=Oculus
[OnlineSubsystemOculus]
bEnabled=true
OculusAppId="123456789012345"
2. I then went into the GAME_NAME.Build.cs file (replacing game_name with my project name) and added the line
DynamicallyLoadedModuleNames.Add("OnlineSubsystemOculus");
3. I then added the code "#include "Online.h" to my project's header file
4. Lastly, I added the entitlement check (as shown below) to run when the project first launches.
Online::GetIdentityInterface()->GetUserPrivilege(
*Online::GetIdentityInterface()->GetUniquePlayerId(0),
EUserPrivileges::CanPlay,
IOnlineIdentity::FOnGetUserPrivilegeCompleteDelegate::CreateLambda([](const FUniqueNetId& UserId, EUserPrivileges::Type Privilege, uint32 CheckResult)
{
if (CheckResult != (uint32)IOnlineIdentity::EPrivilegeResults::NoFailures)
{
// User is NOT entitled.
showMessageThatTheUserDoesntOwnThis();
}
else
{
// User IS entitled
proceedAsNormal();
}
}));
When I launch the project, I went into console to see if the commands had went through, and for each line in the code listed above in #4, the system shows "Command not found." Is this even possible in a Blueprint project?
I have since tried rebuilding the project in 4.12.5, using the Oculus SDK 1.7.0 (via Oculus's branch of the engine), and even tried it with the built-in entitlement check Blueprint node in 4.12.5 with 1.7.0, but when doing that check, the project never runs- it fails regardless of whether the end user is logged in or not.
I'm hoping someone else has run into this issue and can help point out something obvious I've missed.
Thanks in advance for your help!
I am following the steps outlined here: https://developer3.oculus.com/docume...m-walkthrough/
1. I've went into the DefaultEngine.ini file and added the necessary code as shown below, replacing the "OculusAppID" with my own App ID.
[OnlineSubsystem]
DefaultPlatformService=Oculus
[OnlineSubsystemOculus]
bEnabled=true
OculusAppId="123456789012345"
2. I then went into the GAME_NAME.Build.cs file (replacing game_name with my project name) and added the line
DynamicallyLoadedModuleNames.Add("OnlineSubsystemOculus");
3. I then added the code "#include "Online.h" to my project's header file
4. Lastly, I added the entitlement check (as shown below) to run when the project first launches.
Online::GetIdentityInterface()->GetUserPrivilege(
*Online::GetIdentityInterface()->GetUniquePlayerId(0),
EUserPrivileges::CanPlay,
IOnlineIdentity::FOnGetUserPrivilegeCompleteDelegate::CreateLambda([](const FUniqueNetId& UserId, EUserPrivileges::Type Privilege, uint32 CheckResult)
{
if (CheckResult != (uint32)IOnlineIdentity::EPrivilegeResults::NoFailures)
{
// User is NOT entitled.
showMessageThatTheUserDoesntOwnThis();
}
else
{
// User IS entitled
proceedAsNormal();
}
}));
When I launch the project, I went into console to see if the commands had went through, and for each line in the code listed above in #4, the system shows "Command not found." Is this even possible in a Blueprint project?
I have since tried rebuilding the project in 4.12.5, using the Oculus SDK 1.7.0 (via Oculus's branch of the engine), and even tried it with the built-in entitlement check Blueprint node in 4.12.5 with 1.7.0, but when doing that check, the project never runs- it fails regardless of whether the end user is logged in or not.
I'm hoping someone else has run into this issue and can help point out something obvious I've missed.
Thanks in advance for your help!
- Are you able to update to UE 4.13? The Online Subsystem Oculus is included with that now, which includes a blueprint node for entitlement checking (no C++ required). There is no need to manually install the Oculus Platform plugin however until the docs get updated you will need to download the Oculus Platform SDK and follow the instructions in the readme.txt about how to set up the DefaultEngine.ini and <project>.Build.cs in order to configure it.
5 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionMoving to the Unreal section of the Developer forum.
- ecosky-oculusExplorerAre you able to update to UE 4.13? The Online Subsystem Oculus is included with that now, which includes a blueprint node for entitlement checking (no C++ required). There is no need to manually install the Oculus Platform plugin however until the docs get updated you will need to download the Oculus Platform SDK and follow the instructions in the readme.txt about how to set up the DefaultEngine.ini and <project>.Build.cs in order to configure it.
- DanielJonesExplorerHey, ecosky. We were finally able to make it work with the Blueprint node in UE4.13. Thank you!
- fengkanExplorerUE crashes when verify entitlement node is called.
Log as below,
UE4Editor_OnlineSubsystemOculus!_delayLoadHelper2()
UE4Editor_OnlineSubsystemOculus!_tailMerge_LibOVRPlatform64_1_dll()
UE4Editor_OnlineSubsystemOculus!FOnlineSubsystemOculus::Shutdown()
UE4Editor_OnlineSubsystemOculus!FOnlineSubsystemOculus::Init()
UE4Editor_OnlineSubsystemOculus!FOnlineFactoryOculus::CreateSubsystem()
UE4Editor_OnlineSubsystem!FOnlineSubsystemModule::GetOnlineSubsystem()
UE4Editor_OnlineSubsystem!IOnlineSubsystem::Get()
UE4Editor_OnlineSubsystemOculus!Online::GetIdentityInterface()
UE4Editor_OnlineSubsystemOculus!UOculusEntitlementCallbackProxy::Activate()
UE4Editor_OnlineSubsystemOculus!UOculusEntitlementCallbackProxy::VerifyEntitlement()
UE4Editor_OnlineSubsystemOculus!UOculusEntitlementCallbackProxy::execVerifyEntitlement()
UE4Editor_CoreUObject!UFunction::Invoke()
UE4Editor_CoreUObject!UObject::CallFunction()
UE4Editor_CoreUObject!UObject::ProcessContextOpcode()
UE4Editor_CoreUObject!UObject::execLetObj()
UE4Editor_CoreUObject!UObject::ProcessInternal()
UE4Editor_CoreUObject!UObject::CallFunction()
How did you manage to do entitlement check using blueprint, DanielJones? - Jarrod84ProtegeIn the UE4 editor, click 'Edit' then click 'Plugins' then scroll down the Plugins list to 'Online Platform' click on that, then scroll down that list to 'Online Subsytem Oculus' check the 'Enabled' tick box then restart.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device