For Some reason GetChatInterface() is not valid… Here is my code;
bool USteamFriendsFunctionLibrary::CreateSteamChat(APlayerController* Controller, FString RoomName)
{
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
FChatRoomId RoomID = "1";
FChatRoomConfig RoomConfig;
RoomConfig.Password = "1234";
RoomConfig.bPasswordRequired = false;
RoomConfig.bRejoinOnDisconnect = true;
if (OnlineSub)
{
IOnlineChatPtr ChatInterface = OnlineSub->GetChatInterface();
if (ChatInterface.IsValid())
{
ULocalPlayer* LocalPlayer = Controller->GetWorld()->GetFirstLocalPlayerFromController();
TSharedPtr<const FUniqueNetId> UniqueNetId = LocalPlayer->GetPreferredUniqueNetId();
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Create Room"));
return ChatInterface->CreateRoom(*UniqueNetId, RoomID, RoomName, RoomConfig);
}
else
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Chat Interface Not Valid"));
return false;
}
}
return false;
}