Waitforendofframe
How to reproduce:
1. Open 'SampleScene' Scene in the attached 'UnityTest.zip' Project
2. Enter Play Mode
3. Press Spacebar on the Keyboard
4. Observe the numbers next to 'OnUpdate' and 'OnEndOfFrame' in the Game View
Expected Behavior: The Coroutine with WaitForEndOfFrame Return type recognizes the Input and the number next to 'OnEndOfFrame' is Incremented
Actual Behavior: The Input Returns false in The Coroutine with WaitForEndOfFrame Return type and the number is not Incremented
Reproducible with: 2017.4.21f1, 2018.3.7f1, 2019.1.0b4, 2019.2.0a6
More Effective Coroutines (MEC) is a free asset on the Unity asset store. If you don’t already have it, you can get it here. More Effective Coroutines is an improved implementation of coroutines that runs about twice as fast as Unity’s coroutines do and has zero per-frame memory allocations. Unity simple Timer with co-routine. GitHub Gist: instantly share code, notes, and snippets. この記事では「 【Unity】はじめてのコルーチン!これさえ読めば基礎はカンペキ 」といった内容について、誰でも理解できるように解説します。この記事を読めば、あなたの悩みが解決するだけじゃなく、新たな気付きも発見できることでしょう。お悩みの方はぜひご一読ください。. In our utility class we use WaitForEndOfFrame. It is important to remind you that this coroutine doesn't work in batchmode when used in the editor. If you plan to run editor tests in batchmode, using a yield return null statement is preferable. When it comes to Game Conductor however, WaitForEndOfFrame is supported as your tests run in PlayMode.
Unity Waitforendofframe Versus Null
Note: The Input.GetKey works perfectly. You can see that the Coroutine that Returns 'null' recognizes the Input and Increments the value next to the 'OnUpdate' in the Game View. The issue is only present in the Editor, the Build behaves as expected. The code is in the 'TextInputEndOfFrame.cs'.