コード例 #1
0
 public static IEnumerator TestPlayToEnd()
 {
     ReportingManager.IsAutomatorTest = false;
     while (!RecordedPlaybackController.IsPlaybackCompleted())
     {
         yield return(null);
     }
 }
コード例 #2
0
        public IEnumerator VerifyAfterPlayback()
        {
            while (!RecordedPlaybackController.Exists() || !RecordedPlaybackController.IsPlaybackCompleted())
            {
                yield return(null);
            }

            var buttonCounter = GameObject.FindGameObjectWithTag("ButtonCount");
            var buttonClicks  = Convert.ToInt32(buttonCounter.GetComponent <Text>().text);

            Assert.AreEqual(10, buttonClicks);
        }
コード例 #3
0
        private void UpdateStateRecordPlayControls()
        {
            if (playModeStartedFromHere &&
                EditorApplication.isPlaying &&
                RecordedPlaybackController.IsPlaybackCompleted() &&
                RecordedPlaybackPersistentData.GetRecordingMode() == RecordingMode.Playback)
            {
                EditorApplication.isPlaying = false;
            }

            // poll for state change
            if (EditorApplication.isPlaying && !isPlayMode)
            {
                isPlayMode = true;
                OnEnterPlaymode();
            }
            else if (!EditorApplication.isPlaying && isPlayMode)
            {
                isPlayMode = false;
                OnExitPlaymode();
            }
        }