protected IEnumerator DoDelayedRelease(IKeyPress keyPress) { var time = Time.unscaledTime; yield return(keyPress.WaitForKeySent()); keyPress.Release(); }
/** * Helper that implements the common pattern of pressing a KeyPress which may be null * and then returning an action to release that key. */ public static Action CallbackPress(IKeyPress keyPress) { if (keyPress == null) { return () => { } } ; keyPress.Press(); return(() => keyPress.Release()); }