Raise Events while in different scenes.

Options

Can I raise an event where one client and host are in different scenes but are in same room.


I want to implement a functionality where after the game starts and host/master client starts the game , whoever joins the game late will have to ask permission from master or host by sending him a notification. So I was asking if i could use events here to do so , since the game scene and lobby scene are different.

Answers

  • Tobias
    Options

    RaiseEvent doesn't mind the scene any client loaded, so: Yes.

    Keep in mind that PUN will only properly work if the client knows all PhotonViews that it gets updates for. So if you load another scene on a late-joining client, it will get updates that it can't handle (if there are networked scene objects in the scene you didn't load yet).

    Maybe it's easier to load the correct scene but show some UI over it until granted access.