

In both cases, the client needs to keep the same UserId and the actor reclaims the same actor number and all previous actor properties on rejoin.Ī hard disconnect is when an actor is completely removed from the room's actors list. You can recover from unexpected soft disconnects using PhotonNetwork.ReconnectAndRejoin() or rejoin the same room after it happens using PhotonNetwork.RejoinRoom.

If PlayerTTL < 0 or PlayerTTL = int.MaxValue the actor can remain inactive forever. The actor remains inactive until PlayerTTL expires.

the owner is null then the master client is the controller.The owner is always the controller unless: The actor in control of the PhotonView (has state authority). Otherwise, the master client has control. In case there is an owner, if the latter is active it is also the controller. In case of 'networked room objects', there is no owner (null) as the object is owned by the room and not by an actor. The owner of the PhotonView indicates the default Controller of the PhotonView. In case of 'networked room objects', there is no creator (null/0) so the networked object is not created by an actor and is instead associated with the room. The ViewID of a PhotonView does not change, so the creator ID also does not change. This actor number is be part of the PhotonView.ViewID and is determined using ViewID / PhotonNetwork.MAX_VIEW_IDS. The creator of a PhotonView or the 'instantiator' (or 'spawner'), is the actor that calls PhotonNetwork.Instantiate. The first client to join a room will be actor number 1, the second will be actor number 2 and so on.Īctors can be targets of messages and one actor per room is assigned as the master client.Ĭreator, Owner and Controller all are references to an actor. ContentsĮach actor is incrementally assigned an new number when joining a room.
#INCONTROL UNITY DISABLE CONTROLLER HOW TO#
We will also list the expected behaviour in different situations and how to explicitly change ownerships of PhotonViews. In this document we will discover the definitions and concepts about PhotonView's control and ownership. In PUN, networked objects are established using the PhotonView component.Įach PhotonView has a creator (instantiator), owner and controller.
