Exemple #1
0
 public static IEnumerator TestPlayToEnd()
 {
     ReportingManager.IsAutomatorTest = false;
     while (!RecordedPlaybackController.IsPlaybackCompleted())
     {
         yield return(null);
     }
 }
        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);
        }
        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();
            }
        }