Ejemplo n.º 1
0
 //The method to use to send data to a session.
 public int SendBytes(int opCode,
                      GameSparksRT.DeliveryIntent deliveryIntent,
                      ArraySegment <byte> unstructuredData,
                      params int[] targetPlayers)
 {
     if (session != null)
     {
         return(session.SendBytes(opCode, deliveryIntent, unstructuredData, targetPlayers));
     }
     return(-1);
 }
Ejemplo n.º 2
0
    //The method to use to send data to a session.
    public int SendBytes(int opCode,
                         GameSparksRT.DeliveryIntent deliveryIntent,
                         ArraySegment <byte> unstructuredData,
                         params int[] targetPlayers)
    {
#if UNITY_WEBGL && !UNITY_EDITOR
        return(SendRTDataAndBytes(opCode, deliveryIntent, unstructuredData, null, targetPlayers));
#else
        if (session != null)
        {
            return(session.SendBytes(opCode, deliveryIntent, unstructuredData, targetPlayers));
        }
        return(-1);
#endif
    }