/*! \endcond */ private void SetPriority() { if (!MasterAudio.Instance.prioritizeOnDistance) { return; } if (ParentGroup.alwaysHighestPriority) { AudioPrioritizer.Set2DSoundPriority(VarAudio); } else { AudioPrioritizer.SetSoundGroupInitialPriority(VarAudio); } }
private void UpdateAudioLocationAndPriority(bool rePrioritize) { // update location, only if following. if (_isFollowing && _objectToFollow != null) { Trans.position = _objectToFollow.position; } // re-set priority, still used by non-following (audio clip age priority) if (!MasterAudio.Instance.prioritizeOnDistance || !rePrioritize || ParentGroup.alwaysHighestPriority) { return; } if (!(Time.realtimeSinceStartup - _priorityLastUpdated > MasterAudio.ReprioritizeTime)) { return; } AudioPrioritizer.Set3DPriority(VarAudio, _useClipAgePriority); _priorityLastUpdated = Time.realtimeSinceStartup; }