I'm getting a big headache. I've been trying to get network session working for our game for a few days now. However, we can never get IOnlineSubsystem's FindSessions to return any result. (0 result - Yes we're following the shooter sample.) All configs are configured. We compiled and tested the shooter project and it is working, but not with our project.
Here's the code:
HostSettings = MakeShareable(new FOnlineSessionSettings());
HostSettings->NumPublicConnections = 10;
HostSettings->NumPrivateConnections = 0;
HostSettings->bIsLANMatch = true;
HostSettings->bShouldAdvertise = true;
HostSettings->bAllowJoinInProgress = true;
HostSettings->bAllowInvites = true;
HostSettings->bUsesPresence = true;
HostSettings->bAllowJoinViaPresence = true;
HostSettings->bAllowJoinViaPresenceFriendsOnly = false;
mSession->CreateSession(ControllerId, MapName, *HostSettings);
SearchSettings = MakeShareable(new FOnlineSessionSearch());
SearchSettings->bIsLanQuery = true;
SearchSettings->MaxSearchResults = 10;
SearchSettings->PingBucketSize = 50;
SearchSettings->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
TSharedRef<FOnlineSessionSearch> SearchSettingsRef = SearchSettings.ToSharedRef();
That's all we have but I don't get what's wrong with it and why it doesn't give out any matching. All delegates are in place and return successfully. We have tried turning bIsLANMatch on and off but that didn't help neither.
Any other pointer for us?
May 27 '14 at 05:48 AM
in C++ Programming