public void useThread(double updateRate = 100, PublisherLoop pubLoop = null) { this.updateRate = updateRate; this.pubLoop = pubLoop; Thread.Sleep(500); thPub = new Thread(new ThreadStart(runPUb)); thPub.Start(); }
public DRPublisher(string name, string serverIP, int serverPort, double updateRate = 100) { if (updateRate <= 60) { throw new Exception("For less than 60Hz, please use Unity's main thread"); } constructorHelper(name, serverIP, serverPort); this.updateRate = updateRate; Loop = null; if (isConnected) { thPub = new Thread(runPUb); thPub.Start(); } }