Created
March 23, 2017 13:42
-
-
Save taibenvenuti/70d3415b06588a4b00984a67fa91eca3 to your computer and use it in GitHub Desktop.
Generate Audio Clip List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audioClipList = new List<string>(); | |
var audioClips = Resources.FindObjectsOfTypeAll<AudioClip>(); | |
for (uint i = 0; i < audioClips.Length; i++) | |
{ | |
var audioClip = audioClips[i]; | |
if (audioClip == null) continue; | |
Debug.Log(audioClip); | |
audioClipList.Add(audioClip.ToString()); | |
} | |
audioClipList.Sort(); | |
var s = audioClips.Length + " Audio Clips found...\n\n"; | |
foreach(var name in audioClipList) | |
{ | |
s = s + name + "\n"; | |
} | |
var path = Path.Combine(ColossalFramework.IO.DataLocation.addonsPath, "AudioClipsList.txt"); | |
File.WriteAllText(path, s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment