#Basicly when session owner leaves and
1 messages ยท Page 1 of 1 (latest)
This should not be possible. When a client leaves, its owned objects will either be despawned or Distributed among the remaining clients
i thought so as well...
but yet its happening on all versions i have right now...
the only way to ifx it i found is to remove the lobby scripts complety and have only the DA
but then tehre is no way to list open sessions currently...
You should not have a separate Lobby. DA Sessions include a lobby
so funnly it needs to be something related to lobby taht has changed lately, as before it was working and now it is not even with old code
realy?? HOW?? i have spend literely a month adding a lobby to it....
It's built into the SessionManager. When you createorjoinSession it makes a lobby and joins it
Check out the widgets package for a Session List prefab you can use quickly
You manage everything through a session. You should not be acting directly on a lobby.
but... can i get a list of sessions avalible to join for a new client?
is it like a full lobby? ๐ ๐
i think i dont have a session manager
Yup that exactly what it is
im creatking the session by using
IMultiplayService calls SessionManager under the hood
If you dig into the source code
Either from the Multiplayer Center Quick start tab or
https://docs.unity3d.com/Packages/com.unity.multiplayer.widgets@1.0/manual/install-widgets.html
Might just be in a the package manager by now
ok thank you very much ๐
Can you tell me also how to use custom session properties like i had in the lobby? ๐ ๐
im creating a session now and i see it in the list but ealier i was able to just use some lobby data to have it all in one place and be able to show for example the game mode in lobby for everyone
but now with widgets i have no idea how to add a custom property so the session
as it looks like i can not edit the EnterSessionData in any way...
id like to acces the AdditionalOptions that for exmale the match maker property uses... and add some custom properties like game mode to it, that will be visible to all players in the lobby list view ๐
but there seems to be no donumentation on this property.... or at least i can not find it anywhere
and it shuld be an option as it uses the lobby service in the backround either way....
and even if i modifiy it im not sure it it gives me anythig as sessions are listed using ISessionInfo that does not containg session properties...
No, with sessions you can only use QuerySessionAsync() to filter the custom data. So you can search for a specific game mode, but you can't list all game modes and scroll through them.
I guess you could run the query for each game mode and add each results to the same session list
Just be careful of the rate limit
but the QuerySessions is using the ISessionInfo data type, so i can not get the actual properties afaik..
i was able to edit the EnterSessionData
and added it into the session properties
but... i have no way of lisitng it by using the ISessionInfo in the session list
as the sessionInfo is stiped down version of the sesion if i understand it correctly ? https://docs.unity3d.com/Packages/com.unity.services.multiplayer@1.0/api/Unity.Services.Multiplayer.ISessionInfo.html
but i can not force it to give me the session instead of sessionInfo
i mean.. i can but it will break many things as its internal part of the multiplater service ๐ ๐
and i dont know yet how to add another command that will querry the sessions instead of the session info
or weather is it even correct approach to get session properties to show on session list
as i want to just show my custom session properties to show here along side of the sesion info like the amount of players in the session
Yea that's one of the current issues with the Widgets. It's super hard to extend them. It's honestly easier to write your own from scratch.
ok i have managed to do it regardles ๐ ๐ i had to write my own variables for it.. but it works ๐ ๐ but good to know there isnt just a simpler way ๐