public void PlayInfoClips() { if (trackableObjects.Count < 1) { Debug.Log("No Trackables Found!"); return; } if (currentTrackedPlayAudioTarget == null || currentTrackedPlayAudioTarget.GetComponentInChildren <PlayAudio>() == null) { Debug.Log("No PlayAudio script attached to this object, or there is no active trackable target atm!"); return; } breakOutOfQuestions = true; if (playAudio != null) { playAudio.PlayInfoClipOnClick(); if (userSettings != null) { userSettings.FadeBGMusicVolume(playAudio.GetAudioSource().clip.length + 0.5f); } } }
public void PlayInfoClips() { if (trackableObjects.Count == 1) { playAudio = currentTrackedTarget.gameObject.GetComponentInChildren <PlayAudio>(); playAudio.PlayInfoClipOnClick(); if (userSettings != null) { userSettings.FadeBGMusicVolume(playAudio.GetAudioSource().clip.length + 0.5f); } } }