I made this code but it gives me an error:
Code:
FString UCToBluePrintFunctionsLibrary::getUserAccount()
{
IOnlineSubsystem* ion = IOnlineSubsystem::Get();
TSharedPtr<const FUniqueNetId> pid = ion->GetIdentityInterface()->GetUniquePlayerId(0);
IOnlineIdentityPtr OnlineIdentity = ion->GetIdentityInterface();
if (pid.IsValid()) {
TSharedPtr<const FUserOnlineAccount> userAccount = OnlineIdentity->GetUserAccount(pid);
return userAccount.GetAccessToken();
}
return FString();
}
It says: no suitable user-defined conversion from “TSharedPtr” to “const FUniqueNetId” exists
can someone correct me plz?