コード例 #1
0
    void Start()
    {
        dummySender = GameObject.Find("/DummySender").GetComponent <DummySender>();

        dataDistributer = gameObject.GetComponent <DataDistributer>();

        queue = new Queue();
        queue = Queue.Synchronized(queue);

        OSCHandler.Instance.Init();
        // パケット受信時のイベントハンドラを登録
        OSCHandler.Instance.PacketReceivedEvent += OnPacketReceived;

        try
        {
            string projectFolder = System.IO.Directory.GetCurrentDirectory();
            logWriter = new System.IO.StreamWriter(
                projectFolder + "/logdata/gps_data_" + System.DateTime.Now.ToString("yyyyMMdd") + ".txt", true);
            stat.Add("OK");
        }
        catch (System.Exception e)
        {
            stat.Add("NG");
            stat.Add(e.Message);
        }
    }
コード例 #2
0
    void Start()
    {
        dummySender = GameObject.Find("/DummySender").GetComponent <DummySender>();

        dataDistributer = gameObject.GetComponent <DataDistributer>();

        queue = new Queue();
        queue = Queue.Synchronized(queue);

        OSCHandler.Instance.Init();
        // パケット受信時のイベントハンドラを登録
        OSCHandler.Instance.PacketReceivedEvent += OnPacketReceived;
    }