Skip to main content
April 10, 2020

Online *** Oculus Interface Ptr Private?

The file OnlineSubsystemOculus.h contains FOnline***OculusPtr objects, but they're private and the accessor methods return the parent IOnline***Ptr object. Is the functionality defined in those classes not supposed to be used (except internally) or does it not matter? The typedef of those types is public and I tried casting, but that fails or I'm doing it wrong, or maybe it only works for blueprint actors, etc.

FOnlineSubsystemOculus* OSS = static_cast<FOnlineSubsystemOculus*>(IOnlineSubsystem::Get());

FOnlineVoiceOculusPtr voice = static_cast<FOnlineVoiceOculusPtr>(OSS->GetVoiceInterface());

FOnlineVoiceOculusPtr voice = Cast<FOnlineVoiceOculusPtr>(OSS->GetVoiceInterface());
I was trying to gain access to FOnlineVoiceOculus::RemoteTalkers so I could hopefully capture the incoming and outgoing voip data, but that variable is private, too and I don't see any accessor methods to obtain it.
    This topic has been closed for replies.

    1 reply

    April 15, 2020
    I discovered there is another way to downcast, which is listed in the official documentation
    https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/SmartPointerLibrary/index.html

    And I saw this on the page where someone implemented spatialization in voip and this will compile, but intellisense doesn't recognize it. (Update - I had to delete and regenerate the binaries for intellisense to work)
    auto oculusVoiceInterface = StaticCastSharedPtr<FOnlineVoiceOculus>(VoiceInterface);