コード例 #1
0
        void Start()
        {
            udpReceiver            = this.gameObject.GetComponent <UDPReceiver>();
            udpReceiver.OnReceived = OnJsonReceived;

            Debug.LogWarning(string.Format("RemotePrefs :: receive json port is [:{0}].", udpReceiver.port)
                             + " send json like this {\"command\": \"set\", \"key\": \"SAMPLE\", \"value_type\": \"int\", \"int_value\": 123}");
        }
コード例 #2
0
 void OnDisable()
 {
     udpReceiver.OnReceived = null;
     udpReceiver.Close();
     udpReceiver = null;
 }