Skip to content

Instantly share code, notes, and snippets.

@taibenvenuti
Created March 23, 2017 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taibenvenuti/70d3415b06588a4b00984a67fa91eca3 to your computer and use it in GitHub Desktop.
Save taibenvenuti/70d3415b06588a4b00984a67fa91eca3 to your computer and use it in GitHub Desktop.
Generate Audio Clip List
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