void Update() { if (Input.GetKeyDown(KeyCode.F)) { Debug.Log(RichTextUtil.Convert(input)); } if (Input.GetKeyDown(KeyCode.G)) { MultipleTask(); } }
void MultipleTask() { ThreadPool.QueueUserWorkItem( (object a) => { for (var i = 0; i < 1000; i++) { Debug.Log(RichTextUtil.Convert(input)); Thread.Sleep(30); } } ); }