Example #1
0
 public virtual void Awake()
 {
     if (isActiveAndEnabled && soundList.Count > 0)
     {
         XLSound.LoadSoundsForScene(soundList);
     }
 }
Example #2
0
 public virtual void OnDestroy()
 {
     if (removeOnUnload && soundList.Count > 0)
     {
         XLSound.RemoveSoundsForScene(soundList);
     }
 }
Example #3
0
        void DrawSentenceRecorder()
        {
            sentence = EditorGUILayout.TextField("Sentence to parse", sentence);
            if (GUILayout.Button("Enter"))
            {
                frames = new List <VORecorderFrame>();
                string[] ary   = sentence.Split(' ');
                int      count = ary.Length;
                L.Log(LogEventType.INT, $"sentence has {ary.Length} spaces");

                // ie: E Ooh E Ooh UR FV SilentMB STCh SilentMB UR
                int delay = Mathf.FloorToInt(recorder.clipLength / count);
                for (int i = 0; i < count; i++)
                {
                    frames.Add(new VORecorderFrame
                    {
                        position  = XLSound.GetEnumForString <VOPositions>(ary[i]),
                        frameTime = i * delay
                    });
                }

                L.Log(LogEventType.INT, $"final count: {count}, delay: {delay}");

                sentenceToken.Cancel();
            }
        }