I have menu screen with 3 buttons:
- Create Session (calls DestroySession THEN CreateAdvancedSession)
- Join Session (calls DestroySession THEN JoinSession)
- Destroy Session (calls DestroySession)
(first of all I’m not sure if I should call DestroySession before both Create/Join, please let me know if it’s a bad idea, but it fixed a bunch of issues for me with not being able to create/join session, because I’m already in one)
Steps that lead to Fatal error: Couldn’t spawn player
- Player 1 presses Create Session button
- Player 2 presses Join Session button
- Player 1 presses Destroy Session button
- Player 2 still gets Join Session “On Success” result. Even though he is not connected anywhere
- Player 2 is not stucked in non existent session, so he presses Destroy Session button to unstuck himself (Destroy Session node returns “On Success”)
- Player 2 now presses Create Session button
- Player 2 gets Fatal error: Couldn’t spawn player
Alternative path:
5a. Player 2 waits in this non existent session until he receives On Connection Timeout error and his session gets destroyed
6a. Player 2 now presses Create Session button and he travels to map without any issues
IMPORTANT
When Player 2 is stucked in non existent session and Player 1 creates new session Player 2 is automatically connected to this session, which sure, makes sense. The issue is that when Player 2 is stucked in non existent session and he presses Destroy Session button which returns “On Success” if Player 1 creates new session, then Player 2 is once again automatically connected to his session, and that I do not understand.
I do not know why Player 2 is getting this fatal error after it says that session is destroyed successfuly so he should be free to do whatever…