private void set_background_clip(BackgroundSource src)
{
//
//FIX background audio clip assignment. i think it will fuck up if there are less than 2 clips found
//
if (src.current_clip == "Default")
{
//build a list of all background clips
List<AudioClip> val_list = new List<AudioClip>();
foreach (AudioClip val in dict_background_samples.Values)
{
val_list.Add(val);
}
//set current source clip from above list (first source gets first clip, second gets second, etc)
src.audiosource.clip = val_list[backgroundsource_list.Count - 1];
//get the file name for the clip
string s = "";
if (dict_background_samples2.TryGetValue(src.audiosource.clip, out s))
{
src.current_clip = s;
if (debugging) Debug.Log("[CHATR] \"Default\" AudioClip set :: current_clip = " + s);
}
}
}