Hello, I was experimenting with EOS.
I can see the session via portal but when I execute FindSession the output of OnFindSessionsComplete bool will be Success but it can’t gonna find any session like 0 maybe I’m missing something please let me know if you know.
Thank you have a nice day.
void UMyGameInstance::FindSessionCustom()
{
if(const IOnlineSessionPtr SessionPtr = OnlineSubsystem->GetSessionInterface())
{
SessionSearch = MakeShareable(new FOnlineSessionSearch());
SessionSearch->bIsLanQuery = false;
SessionPtr->FindSessions(0, SessionSearch.ToSharedRef());
}
}
void UMyGameInstance::OnFindSessionsComplete(bool bSuccess)
{
UE_LOG(LogTemp, Warning, TEXT("find session: %d"), bSuccess);
if(bSuccess)
{
if(SessionSearch)
{
auto SearchResults = SessionSearch->SearchResults;
UE_LOG(LogTemp, Warning, TEXT("total sesssion: %d"), SearchResults.Num());
for(auto resualt : SearchResults)
{
UE_LOG(LogTemp, Warning, TEXT("for loop"))
PrintLogCustom(resualt.Session.OwningUserName);
}
}
}
}