public static void CopyAndroidLibrary(string sourceFullPath, string destinationFullPath) { Q3DAudioManager.DebugLogAlways("Copying " + sourceFullPath + " to " + destinationFullPath); File.SetAttributes(destinationFullPath, FileAttributes.Normal); File.Copy(sourceFullPath, destinationFullPath, true); }
static public void LogIfQ3DAudioSourceNumIsNotCorrect(int q3dAudioSourcesLength, int audioSourcesLength, string gameObjectName) { if (q3dAudioSourcesLength != audioSourcesLength) { Q3DAudioManager.DebugLogAlways( "Authoring error: there should either be no Q3DAudioSource's on a GameObject, or there should be as many Q3DAudioSource's on the " + "GameObject as there are AudioSource's. However, on " + gameObjectName + " there are " + audioSourcesLength + " AudioSource(s) and " + q3dAudioSourcesLength + " Q3DAudioSource(s). Spatialization of these AudioSource's may be inconsistent"); } }
static public void SpatializeMonoAudioSources(bool log) { AudioSource[] audioSources = FindObjectsOfTypeAllWrapper <AudioSource>(); foreach (AudioSource audioSource in audioSources) { AudioClip clip = audioSource.clip; if (clip && clip.channels == 1 && audioSource.GetComponent <Q3DAudioSource>() == null) { audioSource.gameObject.AddComponent(typeof(Q3DAudioSource)); audioSource.spatialize = true; if (log) { Q3DAudioManager.DebugLogAlways("AudioSource " + audioSource.gameObject.name + " with mono clip " + clip.name + " found without a Q3DAudioSource; adding Q3DAudioSource and setting Spatialize=true"); } } } }