C# 클래스 PhotonView

상속: Photon.MonoBehaviour
파일 보기 프로젝트 열기: daniel-cheng/stellar 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ObservedComponents List
group int
instantiationId int
observed Component
onSerializeRigidBodyOption OnSerializeRigidBody
onSerializeTransformOption OnSerializeTransform
ownerId int
ownershipTransfer OwnershipOption
prefixBackup int
synchronization ViewSynchronization

보호된 프로퍼티들

프로퍼티 타입 설명
didAwake bool
lastOnSerializeDataReceived object[]
lastOnSerializeDataSent object[]
mixedModeIsReliable bool
removedFromLocalViewList bool

공개 메소드들

메소드 설명
DeserializeView ( PhotonStream, stream, PhotonMessageInfo, info ) : void
Find ( int viewID ) : PhotonView,
Get ( Component component ) : PhotonView,
Get ( GameObject gameObj ) : PhotonView,
RPC ( string methodName, PhotonPlayer, targetPlayer ) : void

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).

[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).

RPC ( string methodName, PhotonTargets target ) : void

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).

[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).

RefreshRpcMonoBehaviourCache ( ) : void

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() 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.

RequestOwnership ( ) : void

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.

RpcSecure ( string methodName, PhotonPlayer, targetPlayer, bool encrypt ) : void

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).

[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).

RpcSecure ( string methodName, PhotonTargets target, bool encrypt ) : void

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).

[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).

SerializeView ( PhotonStream, stream, PhotonMessageInfo, info ) : void
ToString ( ) : string
TransferOwnership ( PhotonPlayer, newOwner ) : void

Transfers the ownership of this PhotonView (and GameObject) to another player.

The owner/controller of a PhotonView is also the client which sends position updates of the GameObject.

TransferOwnership ( int newOwnerId ) : void

Transfers the ownership of this PhotonView (and GameObject) to another player.

The owner/controller of a PhotonView is also the client which sends position updates of the GameObject.

보호된 메소드들

메소드 설명
Awake ( ) : void

Called by Unity on start of the application and does a setup the PhotonView.

DeserializeComponent ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void
ExecuteComponentOnSerialize ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void
OnDestroy ( ) : void
SerializeComponent ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void

비공개 메소드들

메소드 설명
OpenPunWizard ( ) : void

메소드 상세

Awake() 보호된 메소드

Called by Unity on start of the application and does a setup the PhotonView.
protected Awake ( ) : void
리턴 void

DeserializeComponent() 보호된 메소드

protected DeserializeComponent ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void
component Component
stream PhotonStream,
info PhotonMessageInfo,
리턴 void

DeserializeView() 공개 메소드

public DeserializeView ( PhotonStream, stream, PhotonMessageInfo, info ) : void
stream PhotonStream,
info PhotonMessageInfo,
리턴 void

ExecuteComponentOnSerialize() 보호된 메소드

protected ExecuteComponentOnSerialize ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void
component Component
stream PhotonStream,
info PhotonMessageInfo,
리턴 void

Find() 공개 정적인 메소드

public static Find ( int viewID ) : PhotonView,
viewID int
리턴 PhotonView,

Get() 공개 정적인 메소드

public static Get ( Component component ) : PhotonView,
component Component
리턴 PhotonView,

Get() 공개 정적인 메소드

public static Get ( GameObject gameObj ) : PhotonView,
gameObj GameObject
리턴 PhotonView,

OnDestroy() 보호된 메소드

protected OnDestroy ( ) : void
리턴 void

RPC() 공개 메소드

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).
[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).
public RPC ( string methodName, PhotonPlayer, targetPlayer ) : void
methodName string The name of a fitting method that was has the RPC attribute.
targetPlayer PhotonPlayer, The group of targets and the way the RPC gets sent.
리턴 void

RPC() 공개 메소드

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).
[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).
public RPC ( string methodName, PhotonTargets target ) : void
methodName string The name of a fitting method that was has the RPC attribute.
target PhotonTargets The group of targets and the way the RPC gets sent.
리턴 void

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() 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.
public RefreshRpcMonoBehaviourCache ( ) : void
리턴 void

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.
public RequestOwnership ( ) : void
리턴 void

RpcSecure() 공개 메소드

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).
[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).
public RpcSecure ( string methodName, PhotonPlayer, targetPlayer, bool encrypt ) : void
methodName string The name of a fitting method that was has the RPC attribute.
targetPlayer PhotonPlayer, The group of targets and the way the RPC gets sent.
encrypt bool
리턴 void

RpcSecure() 공개 메소드

Call a RPC method of this GameObject on remote clients of this room (or on all, inclunding this client).
[Remote Procedure Calls](@ref rpcManual) 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](@ref rpcManual).
public RpcSecure ( string methodName, PhotonTargets target, bool encrypt ) : void
methodName string The name of a fitting method that was has the RPC attribute.
target PhotonTargets The group of targets and the way the RPC gets sent.
encrypt bool
리턴 void

SerializeComponent() 보호된 메소드

protected SerializeComponent ( Component component, PhotonStream, stream, PhotonMessageInfo, info ) : void
component Component
stream PhotonStream,
info PhotonMessageInfo,
리턴 void

SerializeView() 공개 메소드

public SerializeView ( PhotonStream, stream, PhotonMessageInfo, info ) : void
stream PhotonStream,
info PhotonMessageInfo,
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

TransferOwnership() 공개 메소드

Transfers the ownership of this PhotonView (and GameObject) to another player.
The owner/controller of a PhotonView is also the client which sends position updates of the GameObject.
public TransferOwnership ( PhotonPlayer, newOwner ) : void
newOwner PhotonPlayer,
리턴 void

TransferOwnership() 공개 메소드

Transfers the ownership of this PhotonView (and GameObject) to another player.
The owner/controller of a PhotonView is also the client which sends position updates of the GameObject.
public TransferOwnership ( int newOwnerId ) : void
newOwnerId int
리턴 void

프로퍼티 상세

ObservedComponents 공개적으로 프로퍼티

public List ObservedComponents
리턴 List

didAwake 보호되어 있는 프로퍼티

protected bool didAwake
리턴 bool

group 공개적으로 프로퍼티

public int group
리턴 int

instantiationId 공개적으로 프로퍼티

public int instantiationId
리턴 int

lastOnSerializeDataReceived 보호되어 있는 프로퍼티

For internal use only, don't use
protected object[] lastOnSerializeDataReceived
리턴 object[]

lastOnSerializeDataSent 보호되어 있는 프로퍼티

For internal use only, don't use
protected object[] lastOnSerializeDataSent
리턴 object[]

mixedModeIsReliable 보호되어 있는 프로퍼티

protected bool mixedModeIsReliable
리턴 bool

observed 공개적으로 프로퍼티

public Component observed
리턴 Component

onSerializeRigidBodyOption 공개적으로 프로퍼티

public OnSerializeRigidBody onSerializeRigidBodyOption
리턴 OnSerializeRigidBody

onSerializeTransformOption 공개적으로 프로퍼티

public OnSerializeTransform onSerializeTransformOption
리턴 OnSerializeTransform

ownerId 공개적으로 프로퍼티

public int ownerId
리턴 int

ownershipTransfer 공개적으로 프로퍼티

Defines if ownership of this PhotonView is fixed, can be requested or simply taken.
Note that you can't edit this value at runtime. The options are described in enum OwnershipOption. The current owner has to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request.
public OwnershipOption ownershipTransfer
리턴 OwnershipOption

prefixBackup 공개적으로 프로퍼티

public int prefixBackup
리턴 int

removedFromLocalViewList 보호되어 있는 프로퍼티

protected bool removedFromLocalViewList
리턴 bool

synchronization 공개적으로 프로퍼티

public ViewSynchronization synchronization
리턴 ViewSynchronization