public SendWriter ( |
||
writer | A writer object containing data to send. | |
channelId | int | The transport channel to send on. |
return | bool |
protected void SendTargetRPCInternal(NetworkConnection conn, NetworkWriter writer, int channelId, string rpcName) { if (!this.isServer) { if (LogFilter.logWarn) { Debug.LogWarning("TargetRpc call on un-spawned object"); } } else { writer.FinishMessage(); conn.SendWriter(writer, channelId); } }
protected void SendTargetRPCInternal(NetworkConnection conn, NetworkWriter writer, int channelId, string rpcName) { // This cannot use NetworkServer.active, as that is not specific to this object. if (!isServer) { if (LogFilter.logWarn) { Debug.LogWarning("TargetRpc call on un-spawned object"); } return; } writer.FinishMessage(); conn.SendWriter(writer, channelId); }
public bool SendWriter(NetworkWriter writer, int channelId) { if (m_Connection != null) { if (m_AsyncConnect != ConnectState.Connected) { if (LogFilter.logError) { Debug.LogError("NetworkClient SendWriter when not connected to a server"); } return(false); } return(m_Connection.SendWriter(writer, channelId)); } if (LogFilter.logError) { Debug.LogError("NetworkClient SendWriter with no connection"); } return(false); }
protected void SendTargetRPCInternal(NetworkConnection conn, NetworkWriter writer, int channelId, string rpcName) { // This cannot use NetworkServer.active, as that is not specific to this object. if (!isServer) { if (LogFilter.logWarn) { Debug.LogWarning("TargetRpc call on un-spawned object"); } return; } writer.FinishMessage(); conn.SendWriter(writer, channelId); #if UNITY_EDITOR UnityEditor.NetworkDetailStats.IncrementStat( UnityEditor.NetworkDetailStats.NetworkDirection.Outgoing, MsgType.Rpc, rpcName, 1); #endif }