private IEnumerator LoopThroughSubtitleLines()
        {
            var lines = _subtitleText.Trim().Split('\n');

            var duration = new WaitForSecondsRealtime(_durationPerLine);

            _subtitleRenderer.Show();

            foreach (var line in lines)
            {
                _subtitleRenderer.SetText(line);

                yield return(duration);
            }

            _subtitleRenderer.Hide();
        }
Beispiel #2
0
 protected virtual void OnEnable()
 {
     _subtitleRenderer.Show();
 }