void OnEnable() { if (pool == null) { pool = GetComponent <AudioGOPool>(); } if (GOAudioNodes == null) { GOAudioNodes = new Dictionary <GameObject, List <RuntimeTuple> >(); } }
public void Initialize(AudioGOPool spawnedFrom) { this.spawnedFrom = spawnedFrom; if (audioSources == null) { audioSources = GetComponents <AudioSource>(); } if (endTimes == null) { endTimes = new double[audioSources.Length]; } if (originalVolume == null) { originalVolume = new float[audioSources.Length]; } }