UE4.11 and Oculus Entitlement Check Issues
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/documentation/platform/latest/concepts/pgsg-3-pw-platform-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.
4. Lastly, I added the entitlement check (as shown below) to run when the project first launches.
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."
I have since tried rebuilding the project in 4.12.5, using the Oculus SDK 1.7.0, and even tried it with the built-in entitlement check in 4.12.5 with 1.7.0, but when doing that the check never runs- it fails regardless of whether the end user is logged in or not.
I'm hoping somone 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/documentation/platform/latest/concepts/pgsg-3-pw-platform-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]2. I then went into the GAME_NAME.Build.cs file (replacing game_name with my project name) and added the line
DefaultPlatformService=Oculus
[OnlineSubsystemOculus]
bEnabled=true
OculusAppId="123456789012345"
DynamicallyLoadedModuleNames.Add("OnlineSubsystemOculus");3. I then added the code "#include "Online.h" to my project's header file4. 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."
I have since tried rebuilding the project in 4.12.5, using the Oculus SDK 1.7.0, and even tried it with the built-in entitlement check in 4.12.5 with 1.7.0, but when doing that the check never runs- it fails regardless of whether the end user is logged in or not.
I'm hoping somone else has run into this issue and can help point out something obvious I've missed.
Thanks in advance for your help!
