CREATE YOUR WORLD
Multiplay

Multiplay Room

5min
room connection process 👍 room connection process request connection from client zepeto multiplay server generates the client session and connects to room if room is successfully connected share the room id and session id connected to the client if the client cannot access the room generate a new room and connect server api the server code should be implemented in world multiplay package → index ts file server provides the following room lifecycle events room lifecycle event description oncreate(options sandboxoptions) called once room has been created room initialize logic can be added here onjoin(client sandboxplayer) called when the client joined the room the parameter client (sandboxplayer) contains the client's sessionid identifier onleave(client sandboxplayer, consented? boolean) called when the client left the room the parameter consented is true when the disconnect is requested by the client ontick(deltatime number) step interval event call on server side, the interval time can be set in sandboxoptions (tickinterval 100ms) the onleave() event occurs when you press 'home button > leave' in the upper left corner during mobile test status the onleave() event does not occur in the unity editor if you're interested in the zepeto multiplay server api, refer to the documentation 📘 please refer to the following guide \[ zepeto multiplay(server) api https //developer zepeto me/docs/multiplay server/ ] client api zepetoworldmultiplay component provides an interface for clients to subscribe to the world play session (room) events from zepeto multiplay server list of available events room eventlistener description roomcreated(room) called when a room is created and accessible provides a room parameter roomjoined(room) called when a room is connected provides a room parameter roomleave(roomleaveevent) called when disconnecting from a room provides a roomleaveevent parameter roomreconnected(room) called when the corresponding room is reconnected provides a room parameter roomerror(roomerrorevent) called when an error occurs in the corresponding room provides a roomerrorevent parameter roomweakconnection called when the connection is unstable