internal IEnumerator <object> ProcessMirrorIterate(AlignMirrorAction action) { const uint MaxAttempts = 1000_000; uint c = 0; while (c < MaxAttempts && POProcessing > 0) { c++; yield return(new WaitForSeconds(0.05f)); } if (c == MaxAttempts) { throw new Exception($"Failed to mirror PO"); } action.DoProcess(); }
internal void ProcessMirror(AlignMirrorAction action) { StartCoroutine(ProcessMirrorIterate(action)); }