Network
- AllocateViewID
- CloseConnection
- connections
- connectionTesterIP
- connectionTesterPort
- Connect
- DestroyPlayerObjects
- Destroy
- Disconnect
- GetAveragePing
- GetLastPing
- HavePublicAddress
- incomingPassword
- InitializeSecurity
- InitializeServer
- Instantiate
- isClient
- isMessageQueueRunning
- isServer
- logLevel
- maxConnections
- minimumAllocatableViewIDs
- natFacilitatorIP
- natFacilitatorPort
- OnConnectedToServer
- OnDisconnectedFromServer
- OnFailedToConnectToM...
- OnFailedToConnect
- OnNetworkInstantiate
- OnPlayerConnected
- OnPlayerDisconnected
- OnSerializeNetworkView
- OnServerInitialized
- peerType
- player
- proxyIP
- proxyPassword
- proxyPort
- RemoveRPCsInGroup
- RemoveRPCs
- sendRate
- SetLevelPrefix
- SetReceivingEnabled
- SetSendingEnabled
- TestConnectionNAT
- TestConnection
- time
- useProxy
Network.RemoveRPCs 移除RPC
static function RemoveRPCs (playerID : NetworkPlayer) : void
Description描述
Remove all RPC functions which belong to this player ID.
移除所有属于这个玩家的ID的RPC函数。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnPlayerDisconnected(NetworkPlayer player) {
Debug.Log("Clean up after player " + player);
Network.RemoveRPCs(player);
Network.DestroyPlayerObjects(player);
}
}
function OnPlayerDisconnected(player: NetworkPlayer) {
Debug.Log("Clean up after player " + player);
Network.RemoveRPCs(player);
Network.DestroyPlayerObjects(player);
}
• static function RemoveRPCs (playerID : NetworkPlayer, group : int) : void
Description描述
Remove all RPC functions which belong to this player ID and were sent based on the given group.
移除属于这个玩家ID和发送基于给定组的所有RPC函数。
• static function RemoveRPCs (viewID : NetworkViewID) : void
Description描述
Remove the RPC function calls accociated with this view ID number.
移除所有与这个viewID数相关的RPC函数调用。
最后修改:2011年4月4日 Monday 16:25