void Awake() { _instance = this; secondsPerBeat = track.bpm / 60f; beatsPerSecond = 60f / track.bpm; waitAndStop = new WaitForSeconds(beatsPerSecond * 2); _trackView = FindObjectOfType <TrackView>(); if (!_trackView) { Debug.LogWarning("No TrackView found in current scene"); } }
void OnDestroy() { _instance = null; }