RPC() private method

private RPC ( PhotonView, view, string methodName, PhotonPlayer, player, bool encrypt ) : void
view PhotonView,
methodName string
player PhotonPlayer,
encrypt bool
return void
 internal static void RPC(string methodName, PhotonPlayer targetPlayer, params object[] parameters)
 {
     if (VerifyCanUseNetwork())
     {
         if (room == null)
         {
             Debug.LogWarning("Cannot send RPCs in Lobby, only processed locally");
         }
         else
         {
             if (player == null)
             {
                 Debug.LogError("Error; Sending RPC to player null! Aborted \"" + methodName + "\"");
             }
             if (networkingPeer != null)
             {
                 networkingPeer.RPC(methodName, targetPlayer, parameters);
             }
             else
             {
                 Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?");
             }
         }
     }
 }
Beispiel #2
0
 internal static void RPC(PhotonView view, string methodName, PhotonTargets target, params object[] parameters)
 {
     if (VerifyCanUseNetwork())
     {
         if (room == null)
         {
             Debug.LogWarning("Cannot send RPCs in Lobby! RPC dropped.");
         }
         else if (networkingPeer != null)
         {
             networkingPeer.RPC(view, methodName, target, parameters);
         }
         else
         {
             Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?");
         }
     }
 }