// Use this for initialization void Start() { target = GetComponent <PointsPCD>(); target.dataPath = @"\test1_pcd"; target1 = GameObject.Find("CubeCreator").GetComponent <cubePCD>(); target1.dataPath = @"\test2_pcd"; //MakeCube(); recThread = new Thread(() => readBytes()); recThread.IsBackground = true; recThread.Start(); sw = new System.Diagnostics.Stopwatch(); sw.Start(); sw.Stop(); print(sw.Elapsed); /* * udpThread = new Thread(() => ReadUDP()); * udpThread.IsBackground = true; * udpThread.Start(); */ }
void MakePCD() { try{ Destroy(GameObject.Find("test1_pcd")); } catch (Exception e) { print("EEEEE: " + e.ToString()); } Debug.Log("LOADING PCD"); if (target == null) { target = GetComponent <PointsPCD>(); target.dataPath = @"\test1_pcd"; } // target.dataPath = @"\PointCloud\example"; // target.enable = true; target.makeCloud(); val = false; }