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