public bool CheckForChanges() { bool hasChanged = false; setups = pureData.GetComponentsInChildren <PureDataSetup>(); #if !UNITY_WEBPLAYER && UNITY_EDITOR string[] resourcesPaths = HelperFunctions.GetFolderPaths("Resources"); List <string> audioFiles = new List <string>(); foreach (string resourcesPath in resourcesPaths) { string[] audioExtensions = { ".wav", ".mp3", ".ogg", ".aiff" }; string[] files = Directory.GetFiles(resourcesPath, "*.*", SearchOption.AllDirectories); foreach (string file in files) { if (audioExtensions.Contains(Path.GetExtension(file).ToLower())) { audioFiles.Add(file); } } } hasChanged = paths == null || paths.Count != audioFiles.Count || setups.Length != audioFiles.Count || !paths.ContentEquals(audioFiles); paths = audioFiles; #endif return(hasChanged); }
public void UpdateAudioSetups() { setups = pureData.GetComponentsInChildren <PureDataSetup>(); foreach (PureDataSetup setup in setups) { setup.Update(); } }