mordentral / AdvancedSessionsPlugin

Advanced Sessions Plugin for UE4
https://www.vreue4.com
MIT License
595 stars 140 forks source link

issue-31: Add option to skip starting a game session after it's created #32

Closed okcodes closed 2 years ago

okcodes commented 2 years ago

Issue: https://github.com/mordentral/AdvancedSessionsPlugin/issues/31

Sometimes, a game needs to create a game session but not to start it immediately.

For example, while waiting for players to join, the game session should be in state EOnlineSessionState::Pending, and when all the players have joined we can finally start the session which changes it's internal state to EOnlineSessionState::InProgress.

Currently, the node CreateAdvancedSession creates a game session immediately starts it.

So, I added the parameter bStartAfterCreate to the CreateAdvancedSession node (set to true by default so it doesn't break current implementations).

Now, to start a game session I added the node StartAdvancedSession.

I didn't add a node to end a game session because such functionality already existed but was deprecated in b68199b1aad. However if needed, I can create another PR to re-enable the node EndSession.

uno1982 commented 2 years ago

Seems like a legit addition to me 👍 Good work!

mordentral commented 2 years ago

I am manually merging this into UE5 due to changes since it was created so I rebased it to 4.27-locked now that that is out.