Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoJoinSessionAndRoom only supports one room in the session #957

Closed
edwinckc opened this issue Sep 12, 2017 · 2 comments
Closed

AutoJoinSessionAndRoom only supports one room in the session #957

edwinckc opened this issue Sep 12, 2017 · 2 comments
Labels

Comments

@edwinckc
Copy link

@StephenHodgson

Hey it's me again! Got a question about the new auto join script in #742 . Is there an underlying assumption that each session only has one room? If I want to create a second room in the same session (eg. RoomA and RoomB), then ShouldLocalUserCreateRoom will prevent a new room from being created, as long as any other user has already connected to the same session. Now in the event that there is an existing room, AutoJoinSessionAndRoom only tries to find an existing room with matching name. If it doesn't match any existing room, it will not try to create a new room.

Was this behaviour intended?
Thanks!

@StephenHodgson
Copy link
Contributor

StephenHodgson commented Sep 12, 2017

Yes, if you want to make and join another room, you should most likely write that into your own app with a real lobby, matchmaking, etc.

This class was mainly a "get there fast" kinda script.

@edwinckc
Copy link
Author

Sorry I wasn't clear. I see that it creates a new room if the room count is 0, but if there are existing rooms already and none of them match, then it doesn't create a new room. I wanted it to create a room if none of the existing ones matched, so I added CreateRoom() to after line 224. Allowing multiple rooms would also require checking for existing room IDs, instead of defaulting to roomID = 1.

But since the assumption is that there is only one room in the session, the script works well and as intended. Thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants