프로퍼티 | 타입 | 설명 | |
---|---|---|---|
IsInitialConnect | bool | ||
PrefabCache | GameObject>.Dictionary | ||
UsePrefabCache | bool | ||
hasSwitchedMC | bool | ||
insideLobby | bool | ||
mActors | PhotonPlayer>.Dictionary | ||
mGameList | RoomInfo>.Dictionary | ||
mGameListCopy | RoomInfo[], | ||
mOtherPlayerListCopy | PhotonPlayer[], | ||
mPlayerListCopy | PhotonPlayer[], |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
LobbyStatistics | List |
||
currentLevelPrefix | short | ||
loadingLevelAndPausedNetwork | bool | ||
mAppId | string | ||
photonViewList | PhotonView>.Dictionary |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
AddNewPlayer | void | ||
AlmostEquals | bool | ||
CheckMasterClient | void | ||
CheckTypeMatch | bool | ||
DeltaCompressionRead | bool | ||
DeltaCompressionWrite | bool | ||
DisconnectToReconnect | void | ||
DoInstantiate | GameObject | ||
GameEnteredOnGameServer | void | ||
GetActorPropertiesForActorNr | ExitGames.Client.Photon.Hashtable | ||
GetLocalActorProperties | ExitGames.Client.Photon.Hashtable | ||
GetNameServerAddress | string | ||
HandleEventLeave | void | ||
LeftLobbyCleanup | void | ||
LeftRoomCleanup | void | ||
ObjectIsSameWithInprecision | bool | ||
OnSerializeRead | void | ||
OnSerializeWrite | ExitGames.Client.Photon.Hashtable | ||
OpRemoveFromServerInstantiationsOfPlayer | void | ||
RPC | void | ||
RPC | void | ||
ReadoutProperties | void | ||
RebuildPlayerListCopies | void | ||
RemoveCacheOfLeftPlayers | void | ||
RemoveInstantiationData | void | ||
RemovePlayer | void | ||
ResetPhotonViewsOnSerialize | void | ||
ReturnLowestPlayerId | int | ||
SendDestroyOfAll | void | ||
SendDestroyOfPlayer | void | ||
SendInstantiate | ExitGames.Client.Photon.Hashtable | ||
SendPlayerName | void | ||
SendVacantViewIds | void | ||
ServerCleanInstantiateAndDestroy | void | ||
StoreInstantiationData | void |
메소드 | 설명 | |
---|---|---|
ChangeLocalID ( int newID ) : void | ||
CleanRpcBufferIfMine ( PhotonView, view ) : void | ||
Connect ( string serverAddress, ServerConnection, type ) : bool | ||
Connect ( string serverAddress, string applicationName ) : bool | ||
ConnectToNameServer ( ) : bool |
Connects to the NameServer for Photon Cloud, where a region and server list can be obtained.
|
|
ConnectToRegionMaster ( CloudRegionCode region ) : bool |
Connects you to a specific region's Master Server, using the Name Server to find the IP.
|
|
DebugReturn ( DebugLevel, level, string message ) : void | ||
DestroyAll ( bool localOnly ) : void | ||
DestroyPlayerObjects ( int playerId, bool localOnly ) : void |
Destroys all Instantiates and RPCs locally and (if not localOnly) sends EvDestroy(player) and clears related events in the server buffer.
|
|
Disconnect ( ) : void |
Complete disconnect from photon (and the open master OR game server)
|
|
FetchInstantiationData ( int instantiationId ) : object[] | ||
GetInstantiatedObjectsId ( GameObject go ) : int |
This returns -1 if the GO could not be found in list of instantiatedObjects.
|
|
GetPhotonView ( int viewID ) : PhotonView, | ||
GetRegions ( ) : bool |
While on the NameServer, this gets you the list of regional servers (short names and their IPs to ping them).
|
|
LocalCleanPhotonView ( PhotonView, view ) : bool | ||
NetworkingPeer ( string playername, ConnectionProtocol connectionProtocol ) : System.Linq | ||
NewSceneLoaded ( ) : void | ||
OnEvent ( EventData, photonEvent ) : void | ||
OnOperationResponse ( OperationResponse operationResponse ) : void | ||
OnStatusChanged ( StatusCode statusCode ) : void | ||
OpCleanRpcBuffer ( PhotonView, view ) : void |
Cleans server RPCs for PhotonView (without any further checks).
|
|
OpCleanRpcBuffer ( int actorNumber ) : void |
Removes the RPCs of someone else (to be used as master). This won't clean any local caches. It just tells the server to forget a player's RPCs and instantiates.
|
|
OpCreateGame ( EnterRoomParams, enterRoomParams ) : bool |
NetworkingPeer.OpCreateGame
|
|
OpFindFriends ( string friendsToFind ) : bool |
Request the rooms and online status for a list of friends. All client must set a unique username via PlayerName property. The result is available in this.Friends. Used on Master Server to find the rooms played by a selected list of users. The result will be mapped to LoadBalancingClient.Friends when available. The list is initialized by OpFindFriends on first use (before that, it is null). Users identify themselves by setting a PlayerName in the LoadBalancingClient instance. This in turn will send the name in OpAuthenticate after each connect (to master and game servers). Note: Changing a player's name doesn't make sense when using a friend list. The list of usernames must be fetched from some other source (not provided by Photon). Internal: The server response includes 2 arrays of info (each index matching a friend from the request): ParameterCode.FindFriendsResponseOnlineList = bool[] of online states ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room) |
|
OpJoinRandomRoom ( OpJoinRandomRoomParams, opJoinRandomRoomParams ) : bool |
NetworkingPeer.OpJoinRandomRoom this override just makes sure we have a mRoomToGetInto, even if it's blank (the properties provided in this method are filters. they are not set when we join the game) |
|
OpJoinRoom ( EnterRoomParams, opParams ) : bool |
NetworkingPeer.OpJoinRoom
|
|
OpLeave ( ) : bool |
Operation Leave will exit any current room. This also happens when you disconnect from the server. Disconnect might be a step less if you don't want to create a new room on the same server. |
|
OpRaiseEvent ( byte eventCode, object customEventContent, bool sendReliable, RaiseEventOptions, raiseEventOptions ) : bool | ||
OpRemoveCompleteCache ( ) : void | ||
OpRemoveCompleteCacheOfPlayer ( int actorNumber ) : void |
Instead removing RPCs or Instantiates, this removed everything cached by the actor.
|
|
RegisterPhotonView ( PhotonView, netView ) : void | ||
RemoveRPCsInGroup ( int group ) : void | ||
RunViewUpdate ( ) : void | ||
SendMonoMessage ( PhotonNetworkingMessage methodString ) : void | ||
SetApp ( string appId, string gameVersion ) : void | ||
SetLevelPrefix ( short prefix ) : void | ||
SetMasterClient ( int nextMasterId ) : bool |
Uses a well-known property to set someone new as Master Client in room (requires "Server Side Master Client" feature).
|
|
SetReceivingEnabled ( int group, bool enabled ) : void | ||
SetReceivingEnabled ( int enableGroups, int disableGroups ) : void | ||
SetSendingEnabled ( int group, bool enabled ) : void | ||
SetSendingEnabled ( int enableGroups, int disableGroups ) : void | ||
WebRpc ( string uriPath, object parameters ) : bool |
메소드 | 설명 | |
---|---|---|
ExecuteRpc ( ExitGames.Client.Photon.Hashtable rpcData, PhotonPlayer, sender ) : void |
Executes a received RPC event
|
|
GetMethod ( MonoBehaviour monob, string methodType, MethodInfo &mi ) : bool | ||
GetPlayerWithId ( int number ) : PhotonPlayer, | ||
LoadLevelIfSynced ( ) : void |
Internally used to detect the current scene and load it if PhotonNetwork.automaticallySyncScene is enabled.
|
|
LocalCleanupAnythingInstantiated ( bool destroyInstantiatedGameObjects ) : void |
Cleans up anything that was instantiated in-game (not loaded with the scene).
|
|
RemoveInstantiatedGO ( GameObject go, bool localOnly ) : void |
Removes GameObject and the PhotonViews on it from local lists and optionally updates remotes. GameObject gets destroyed at end. This method might fail and quit early due to several tests. |
|
RequestOwnership ( int viewID, int fromOwner ) : void | ||
SetLevelInPropsIfSynced ( object levelId ) : void | ||
SetMasterClient ( int playerId, bool sync ) : bool |
Fake-sets a new Master Client for this room via RaiseEvent. Does not affect RaiseEvent with target MasterClient but RPC(). |
|
TransferOwnership ( int viewID, int playerID ) : void | ||
UpdateMasterClient ( ) : void |
Call when the server provides a MasterClientId (due to joining or the current MC leaving, etc).
|
|
UpdatedActorList ( int actorsInRoom ) : void |
메소드 | 설명 | |
---|---|---|
AddNewPlayer ( int ID, PhotonPlayer, player ) : void | ||
AlmostEquals ( object lastData, object currentContent ) : bool | ||
CheckMasterClient ( int leavingPlayerId ) : void |
Picks the new master client from player list, if the current Master is leaving (leavingPlayerId) or if no master was assigned so far.
|
|
CheckTypeMatch ( ParameterInfo methodParameters, Type callParameterTypes ) : bool |
Check if all types match with parameters. We can have more paramters then types (allow last RPC type to be different).
|
|
DeltaCompressionRead ( PhotonView, view, ExitGames.Client.Photon.Hashtable data ) : bool |
reads incoming messages created by "OnSerialize"
|
|
DeltaCompressionWrite ( PhotonView, view, ExitGames.Client.Photon.Hashtable data ) : bool |
Compares the new data with previously sent data and skips values that didn't change.
|
|
DisconnectToReconnect ( ) : void |
Internally used only. Triggers OnStateChange with "Disconnect" in next dispatch which is the signal to re-connect (if at all).
|
|
DoInstantiate ( ExitGames.Client.Photon.Hashtable evData, PhotonPlayer, photonPlayer, GameObject resourceGameObject ) : GameObject | ||
GameEnteredOnGameServer ( OperationResponse operationResponse ) : void | ||
GetActorPropertiesForActorNr ( ExitGames.Client.Photon.Hashtable actorProperties, int actorNr ) : ExitGames.Client.Photon.Hashtable | ||
GetLocalActorProperties ( ) : ExitGames.Client.Photon.Hashtable | ||
GetNameServerAddress ( ) : string |
Gets the NameServer Address (with prefix and port), based on the set protocol (this.UsedProtocol).
|
|
HandleEventLeave ( int actorID, EventData, evLeave ) : void |
Called when the event Leave (of some other player) arrived. Cleans game objects, views locally. The master will also clean the
|
|
LeftLobbyCleanup ( ) : void |
Called at disconnect/leavelobby etc. This CAN also be called when we are not in a lobby (e.g. disconnect from room) Calls callback method OnLeftLobby if this client was in a lobby initially. Clears the lobby's game lists. |
|
LeftRoomCleanup ( ) : void |
Called when "this client" left a room to clean up.
|
|
ObjectIsSameWithInprecision ( object one, object two ) : bool |
Returns true if both objects are almost identical. Used to check whether two objects are similar enough to skip an update.
|
|
OnSerializeRead ( ExitGames.Client.Photon.Hashtable data, PhotonPlayer, sender, int networkTime, short correctPrefix ) : void |
Reads updates created by OnSerializeWrite
|
|
OnSerializeWrite ( PhotonView, view ) : ExitGames.Client.Photon.Hashtable | ||
OpRemoveFromServerInstantiationsOfPlayer ( int actorNr ) : void | ||
RPC ( PhotonView, view, string methodName, PhotonPlayer, player, bool encrypt ) : void | ||
RPC ( PhotonView, view, string methodName, PhotonTargets target, bool encrypt ) : void | ||
ReadoutProperties ( ExitGames.Client.Photon.Hashtable gameProperties, ExitGames.Client.Photon.Hashtable pActorProperties, int targetActorNr ) : void | ||
RebuildPlayerListCopies ( ) : void | ||
RemoveCacheOfLeftPlayers ( ) : void | ||
RemoveInstantiationData ( int instantiationId ) : void | ||
RemovePlayer ( int ID, PhotonPlayer, player ) : void | ||
ResetPhotonViewsOnSerialize ( ) : void |
Resets the PhotonView "lastOnSerializeDataSent" so that "OnReliable" synched PhotonViews send a complete state to new clients (if the state doesnt change, no messages would be send otherwise!). Note that due to this reset, ALL other players will receive the full OnSerialize.
|
|
ReturnLowestPlayerId ( PhotonPlayer, players, int playerIdToIgnore ) : int | ||
SendDestroyOfAll ( ) : void | ||
SendDestroyOfPlayer ( int actorNr ) : void | ||
SendInstantiate ( string prefabName, Vector3 position, Quaternion rotation, int group, int viewIDs, object data, bool isGlobalObject ) : ExitGames.Client.Photon.Hashtable | ||
SendPlayerName ( ) : void | ||
SendVacantViewIds ( ) : void | ||
ServerCleanInstantiateAndDestroy ( int instantiateId, int creatorId, bool isRuntimeInstantiated ) : void |
Removes an instantiation event from the server's cache. Needs id and actorNr of player who instantiated.
|
|
StoreInstantiationData ( int instantiationId, object instantiationData ) : void |
public CleanRpcBufferIfMine ( PhotonView, view ) : void | ||
view | PhotonView, | |
리턴 | void |
public Connect ( string serverAddress, ServerConnection, type ) : bool | ||
serverAddress | string | |
type | ServerConnection, | |
리턴 | bool |
public Connect ( string serverAddress, string applicationName ) : bool | ||
serverAddress | string | |
applicationName | string | |
리턴 | bool |
public ConnectToRegionMaster ( CloudRegionCode region ) : bool | ||
region | CloudRegionCode | |
리턴 | bool |
public DebugReturn ( DebugLevel, level, string message ) : void | ||
level | DebugLevel, | |
message | string | |
리턴 | void |
public DestroyPlayerObjects ( int playerId, bool localOnly ) : void | ||
playerId | int | |
localOnly | bool | |
리턴 | void |
protected ExecuteRpc ( ExitGames.Client.Photon.Hashtable rpcData, PhotonPlayer, sender ) : void | ||
rpcData | ExitGames.Client.Photon.Hashtable | |
sender | PhotonPlayer, | |
리턴 | void |
public FetchInstantiationData ( int instantiationId ) : object[] | ||
instantiationId | int | |
리턴 | object[] |
public GetInstantiatedObjectsId ( GameObject go ) : int | ||
go | GameObject | |
리턴 | int |
protected static GetMethod ( MonoBehaviour monob, string methodType, MethodInfo &mi ) : bool | ||
monob | MonoBehaviour | |
methodType | string | |
mi | MethodInfo | |
리턴 | bool |
protected GetPlayerWithId ( int number ) : PhotonPlayer, | ||
number | int | |
리턴 | PhotonPlayer, |
public LocalCleanPhotonView ( PhotonView, view ) : bool | ||
view | PhotonView, | |
리턴 | bool |
protected LocalCleanupAnythingInstantiated ( bool destroyInstantiatedGameObjects ) : void | ||
destroyInstantiatedGameObjects | bool | |
리턴 | void |
public NetworkingPeer ( string playername, ConnectionProtocol connectionProtocol ) : System.Linq | ||
playername | string | |
connectionProtocol | ConnectionProtocol | |
리턴 | System.Linq |
public OnOperationResponse ( OperationResponse operationResponse ) : void | ||
operationResponse | OperationResponse | |
리턴 | void |
public OnStatusChanged ( StatusCode statusCode ) : void | ||
statusCode | StatusCode | |
리턴 | void |
public OpCleanRpcBuffer ( PhotonView, view ) : void | ||
view | PhotonView, | |
리턴 | void |
public OpCleanRpcBuffer ( int actorNumber ) : void | ||
actorNumber | int | |
리턴 | void |
public OpCreateGame ( EnterRoomParams, enterRoomParams ) : bool | ||
enterRoomParams | EnterRoomParams, | |
리턴 | bool |
public OpFindFriends ( string friendsToFind ) : bool | ||
friendsToFind | string | Array of friend's names (make sure they are unique). |
리턴 | bool |
public OpJoinRandomRoom ( OpJoinRandomRoomParams, opJoinRandomRoomParams ) : bool | ||
opJoinRandomRoomParams | OpJoinRandomRoomParams, | |
리턴 | bool |
public OpJoinRoom ( EnterRoomParams, opParams ) : bool | ||
opParams | EnterRoomParams, | |
리턴 | bool |
public OpRaiseEvent ( byte eventCode, object customEventContent, bool sendReliable, RaiseEventOptions, raiseEventOptions ) : bool | ||
eventCode | byte | |
customEventContent | object | |
sendReliable | bool | |
raiseEventOptions | RaiseEventOptions, | |
리턴 | bool |
public OpRemoveCompleteCacheOfPlayer ( int actorNumber ) : void | ||
actorNumber | int | |
리턴 | void |
public RegisterPhotonView ( PhotonView, netView ) : void | ||
netView | PhotonView, | |
리턴 | void |
protected RemoveInstantiatedGO ( GameObject go, bool localOnly ) : void | ||
go | GameObject | GameObject to cleanup. |
localOnly | bool | For localOnly, tests of control are skipped and the server is not updated. |
리턴 | void |
protected RequestOwnership ( int viewID, int fromOwner ) : void | ||
viewID | int | |
fromOwner | int | |
리턴 | void |
public static SendMonoMessage ( PhotonNetworkingMessage methodString ) : void | ||
methodString | PhotonNetworkingMessage | |
리턴 | void |
public SetApp ( string appId, string gameVersion ) : void | ||
appId | string | |
gameVersion | string | |
리턴 | void |
protected SetLevelInPropsIfSynced ( object levelId ) : void | ||
levelId | object | |
리턴 | void |
public SetMasterClient ( int nextMasterId ) : bool | ||
nextMasterId | int | |
리턴 | bool |
protected SetMasterClient ( int playerId, bool sync ) : bool | ||
playerId | int | |
sync | bool | |
리턴 | bool |
public SetReceivingEnabled ( int group, bool enabled ) : void | ||
group | int | |
enabled | bool | |
리턴 | void |
public SetReceivingEnabled ( int enableGroups, int disableGroups ) : void | ||
enableGroups | int | |
disableGroups | int | |
리턴 | void |
public SetSendingEnabled ( int group, bool enabled ) : void | ||
group | int | |
enabled | bool | |
리턴 | void |
public SetSendingEnabled ( int enableGroups, int disableGroups ) : void | ||
enableGroups | int | |
disableGroups | int | |
리턴 | void |
protected TransferOwnership ( int viewID, int playerID ) : void | ||
viewID | int | |
playerID | int | |
리턴 | void |
protected UpdatedActorList ( int actorsInRoom ) : void | ||
actorsInRoom | int | |
리턴 | void |
public WebRpc ( string uriPath, object parameters ) : bool | ||
uriPath | string | |
parameters | object | |
리턴 | bool |