|
| void | OnPreNetDestroy (PhotonView rootView) |
| |
| void | RequestOwnership () |
| | Depending on the PhotonView's OwnershipTransfer setting, any client can request to become owner of the PhotonView. More...
|
| |
| void | TransferOwnership (Player newOwner) |
| | Transfers the ownership of this PhotonView (and GameObject) to another player. More...
|
| |
| void | TransferOwnership (int newOwnerId) |
| | Transfers the ownership of this PhotonView (and GameObject) to another player. More...
|
| |
| void | FindObservables (bool force=false) |
| | Will find IPunObservable components on this GameObject and nested children and add them to the ObservedComponents list. More...
|
| |
| void | SerializeView (PhotonStream stream, PhotonMessageInfo info) |
| |
| void | DeserializeView (PhotonStream stream, PhotonMessageInfo info) |
| |
| void | RefreshRpcMonoBehaviourCache () |
| | Can be used to refesh the list of MonoBehaviours on this GameObject while PhotonNetwork.UseRpcMonoBehaviourCache is true. More...
|
| |
| void | RPC (string methodName, RpcTarget target, params object[] parameters) |
| | Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). More...
|
| |
| void | RpcSecure (string methodName, RpcTarget target, bool encrypt, params object[] parameters) |
| | Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). More...
|
| |
| void | RPC (string methodName, Player targetPlayer, params object[] parameters) |
| | Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). More...
|
| |
| void | RpcSecure (string methodName, Player targetPlayer, bool encrypt, params object[] parameters) |
| | Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). More...
|
| |
| void | AddCallbackTarget (IPhotonViewCallback obj) |
| | Add object to all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. More...
|
| |
| void | RemoveCallbackTarget (IPhotonViewCallback obj) |
| | Remove object from all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. More...
|
| |
| void | AddCallback< T > (IPhotonViewCallback obj) |
| | Add object to this PhotonView's callback. T is the IOnPhotonViewCallback derived interface you want added to its associated callback list. Supplying IOnPhotonViewCallback (the interface base class) as T will add ALL implemented IOnPhotonViewCallback Interfaces found on the object. More...
|
| |
| void | RemoveCallback< T > (IPhotonViewCallback obj) |
| | Remove object from this PhotonView's callback list for T. T is the IOnPhotonViewCallback derived interface you want removed from its associated callback list. Supplying IOnPhotonViewCallback (the interface base class) as T will remove ALL implemented IOnPhotonViewCallback Interfaces found on the object. More...
|
| |
| override string | ToString () |
| |
A PhotonView identifies an object across the network (viewID) and configures how the controlling client updates remote instances.
| void Photon.Pun.PhotonView.FindObservables |
( |
bool |
force = false | ) |
|
Will find IPunObservable components on this GameObject and nested children and add them to the ObservedComponents list.
This is called via PhotonView.Awake(), which in turn is called immediately by the engine's AddComponent method.
Changing the ObservedComponents of a PhotonView at runtime can be problematic, if other clients are not also updating their list.
- Parameters
-
| force | If true, FindObservables will work as if observableSearch is AutoFindActive. |
| void Photon.Pun.PhotonView.RefreshRpcMonoBehaviourCache |
( |
| ) |
|
Can be used to refesh the list of MonoBehaviours on this GameObject while PhotonNetwork.UseRpcMonoBehaviourCache is true.
Set PhotonNetwork.UseRpcMonoBehaviourCache to true to enable the caching. Uses this.GetComponents<MonoBehaviour>() to get a list of MonoBehaviours to call RPCs on (potentially).
While PhotonNetwork.UseRpcMonoBehaviourCache is false, this method has no effect, because the list is refreshed when a RPC gets called.
| void Photon.Pun.PhotonView.RequestOwnership |
( |
| ) |
|
Depending on the PhotonView's OwnershipTransfer setting, any client can request to become owner of the PhotonView.
Requesting ownership can give you control over a PhotonView, if the OwnershipTransfer setting allows that. The current owner might have to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request.
The owner/controller of a PhotonView is also the client which sends position updates of the GameObject.
| void Photon.Pun.PhotonView.RPC |
( |
string |
methodName, |
|
|
RpcTarget |
target, |
|
|
params object [] |
parameters |
|
) |
| |
Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
Remote Procedure Calls are an essential tool in making multiplayer games with PUN. It enables you to make every client in a room call a specific method.
RPC calls can target "All" or the "Others". Usually, the target "All" gets executed locally immediately after sending the RPC. The "*ViaServer" options send the RPC to the server and execute it on this client when it's sent back. Of course, calls are affected by this client's lag and that of remote clients.
Each call automatically is routed to the same PhotonView (and GameObject) that was used on the originating client.
See: Remote Procedure Calls.
- Parameters
-
| methodName | The name of a fitting method that was has the RPC attribute. |
| target | The group of targets and the way the RPC gets sent. |
| parameters | The parameters that the RPC method has (must fit this call!). |
| void Photon.Pun.PhotonView.RPC |
( |
string |
methodName, |
|
|
Player |
targetPlayer, |
|
|
params object [] |
parameters |
|
) |
| |
Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
Remote Procedure Calls are an essential tool in making multiplayer games with PUN. It enables you to make every client in a room call a specific method.
This method allows you to make an RPC calls on a specific player's client. Of course, calls are affected by this client's lag and that of remote clients.
Each call automatically is routed to the same PhotonView (and GameObject) that was used on the originating client.
See: Remote Procedure Calls.
- Parameters
-
| methodName | The name of a fitting method that was has the RPC attribute. |
| targetPlayer | The group of targets and the way the RPC gets sent. |
| parameters | The parameters that the RPC method has (must fit this call!). |
| void Photon.Pun.PhotonView.RpcSecure |
( |
string |
methodName, |
|
|
RpcTarget |
target, |
|
|
bool |
encrypt, |
|
|
params object [] |
parameters |
|
) |
| |
Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
Remote Procedure Calls are an essential tool in making multiplayer games with PUN. It enables you to make every client in a room call a specific method.
RPC calls can target "All" or the "Others". Usually, the target "All" gets executed locally immediately after sending the RPC. The "*ViaServer" options send the RPC to the server and execute it on this client when it's sent back. Of course, calls are affected by this client's lag and that of remote clients.
Each call automatically is routed to the same PhotonView (and GameObject) that was used on the originating client.
See: Remote Procedure Calls.
param name="methodName">The name of a fitting method that was has the RPC attribute.
param name="target">The group of targets and the way the RPC gets sent.
param name="encrypt">
param name="parameters">The parameters that the RPC method has (must fit this call!).
| void Photon.Pun.PhotonView.RpcSecure |
( |
string |
methodName, |
|
|
Player |
targetPlayer, |
|
|
bool |
encrypt, |
|
|
params object [] |
parameters |
|
) |
| |
Call a RPC method of this GameObject on remote clients of this room (or on all, including this client).
Remote Procedure Calls are an essential tool in making multiplayer games with PUN. It enables you to make every client in a room call a specific method.
This method allows you to make an RPC calls on a specific player's client. Of course, calls are affected by this client's lag and that of remote clients.
Each call automatically is routed to the same PhotonView (and GameObject) that was used on the originating client.
See: Remote Procedure Calls.
param name="methodName">The name of a fitting method that was has the RPC attribute.
param name="targetPlayer">The group of targets and the way the RPC gets sent.
param name="encrypt">
param name="parameters">The parameters that the RPC method has (must fit this call!).