public static IEnumerator ClickMouseButton(int button) { InputBroker.SetMouseButtonDown(button); yield return(new WaitForEndOfFrame()); InputBroker.SetMouseButton(button); yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); InputBroker.SetMouseButtonUp(button); yield return(new WaitForEndOfFrame()); InputBroker.DeleteMouseButton(button); }