情况现在是这个样:
写在线子系统,写到加入会话的时候,Rider提示找不到SEARCH_PRESENCE这个宏,重启IDE或者Unreal没用,重构项目也没用。
代码如下:
void AMultiplayerDemoCharacter::JoinGameSession()
{
//Find game sessions
if(!OnlineSessionInterface.IsValid())
{
return;
}
OnlineSessionInterface->AddOnFindSessionsCompleteDelegate_Handle(FindSessionsCompleteDelegate);
SessionSearch = MakeShareable(new FOnlineSessionSearch());
SessionSearch->MaxSearchResults = 10000;
SessionSearch->bIsLanQuery = false;
SessionSearch->QuerySettings.Set( , true, EOnlineComparisonOp::Equals);
const ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController();
OnlineSessionInterface->FindSessions(*LocalPlayer->GetPreferredUniqueNetId(),SessionSearch.ToSharedRef());
}
跪求解决方案,小弟拜谢