public virtual void Awake() { if (isActiveAndEnabled && soundList.Count > 0) { XLSound.LoadSoundsForScene(soundList); } }
public virtual void OnDestroy() { if (removeOnUnload && soundList.Count > 0) { XLSound.RemoveSoundsForScene(soundList); } }
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(); } }