I'm currently working on a game for gear vr in unreal engine 4.17 and I am having difficulties with accessing some of the oculus platform features via the unreal OSS. I have gotten entitlement to work with the blueprint node Verify Entitlement but the blueprint node Get Oculus Identity doesnt exit on either failure or success. I have tried to get the name via c++ with the following code:
auto OculusSubsystem = static_cast<FOnlineSubsystemOculus*>(IOnlineSubsystem::Get());
auto identityInterface = OculusSubsystem->GetIdentityInterface();
auto playerID = identityInterface->GetUniquePlayerId(0);
i then return the playerName and output it in one of the menus ingame and it prints localhost followed by random letters and numbers.
I have also tried to access the native c api as recommended by some of the staff here in the forums but if I add the libovrplatform as follows in the build.cs file: PublicDependencyModuleNames.AddRange(new string[] { "LibOVRPlatform" });
then Unreal Engine will crash everytime I build the c++ project if there are any ovr_* calls.
Here are 3 lines from the crash log that i believe are the only signifcant Unknown exception - code c06d007e
I have even tried disabling the oculus online subsystem with the plan of handling everything myself by coding against the native c api (libovrplatform) but then I get linker errors everytime i try to call an ovr_* function.
So my question is: How can I get the oculus username (am i missing something)? And if this is not possible with the unreal OSS then how can I access the native C API without unreal engine crashing?