Esempio n. 1
0
        public void SendAnchorName(String anchorName, String anchorOwnerIP)
        {
            // Use a different NetworkData instance so we do not overwrite our pose data.
            NetworkData networkData = new NetworkData();

            networkData.SerializeAnchorName(anchorName, anchorOwnerIP);

            SendMessage(networkData);
        }
Esempio n. 2
0
        private void SendMessage(NetworkData networkData)
        {
            byte error;

            NetworkTransport.Send(socketId, connectionId, channelId, networkData.buffer, NetworkData.bufSize, out error);

            if (error != (byte)NetworkError.Ok)
            {
                Debug.Log("Error sending network message.");
            }
        }
Esempio n. 3
0
        public void SendAirTap(Vector3 position, Vector3 rotation, Vector3 hitLocation)
        {
            // Use a different NetworkData instance so we do not overwrite our pose data.
            NetworkData networkData = new NetworkData();

            networkData.SerializeAirTap(
                GetVectorInAnchorSpace(position),
                GetVectorInAnchorSpace(rotation),
                GetVectorInAnchorSpace(hitLocation));

            SendMessage(networkData);
        }