EpicGames / EOS-Getting-Started

MIT License
110 stars 62 forks source link

EOS Context changes #13

Closed Ixiodor closed 1 year ago

Ixiodor commented 1 year ago

Hi, I used your code and all works fine, but for client (player controller) it does all in a chained events till you join the session. So I wanted to split the "Find Sessions" and "Join Session" from your code and made 2 UBlueprintAsyncActionBase node to use in blueprint. What happens is that using your code for "Search Sessions" in that code causes "Invalid_User". This seems cause from: IOnlineSubsystem* Subsystem = Online::GetSubsystem(GetWorld()); that return 2 different context. Can you help me resolving that?

SebBergy commented 1 year ago

I don't think the issue here is with Online::GetSubsystem(GetWorld()) as the OSS instance is the same. Could you share your logs for when the error is thrown? Is it possible when you split the code up you are calling FindSessions() before the player is logged in completely? The FindSessions() should only be done once the Login callback has been triggered.

Ixiodor commented 1 year ago

Hi, thanks for you reply. Actually got it fixed "casually" and the problem was that: GetWorld() inside UBlueprintAsyncActionBase->Activate return null. I replaced GetWorld() with GEngine->GameViewport->GetWorld();