private float m_fltSubtitleTimer; // keep track of how long a subtitle should be displayed // on loaded void Awake() { Instance = this; // set the instance to this object reference m_voBank = this.GetComponent <VOBank>(); // get the vo bank reference m_audSrc = this.GetComponent <AudioSource>(); // get the audio source on this object m_externalAudSrc = null; // reset the external audio source }
private void OnEnable() { // set the reference to the current inspected object voBank = (VOBank)target; }
// on enabled void OnEnable() { m_audSrc = this.GetComponent<AudioSource>(); // get the object's audio source component voBank = this.GetComponent<VOBank>(); // get the VOBank reference }
// on enabled private void OnEnable() { // set the reference to the current inspected object voBank = (VOBank)target; }