// Use this for initialization protected virtual void Awake() { m_audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager>(); if (m_audioManager == null) { Debug.LogError("No AudioManager found in scene!"); } else { } if ((m_affector = GetComponent <OnRhythmPeriodicAffector>()) != true) { // no affector found } }