#Mod custom hoarding bug chitterSFX sound

1 messages · Page 1 of 1 (latest)

mighty nebula
#

i'm trying to make my first mod for lethal company that modifies the audio of the hoarding bug, but i can't find a way to do it because in this line SFXarray = AssetBundle.LoadFromFile(arrayFolderLocation + "AudioBundle2"); throws this error Cannot implicitly convert type 'UnityEngine.AssetBundle' to 'UnityEngine.AssetBundle[]' and i don't know how to fix it, any help is appreciated, thank you

mighty nebula
#

SFXarray = AssetBundle.LoadFromFile(arrayFolderLocation + "AudioBundle2");

fallen trench
#

that doesnt answer the question

#

what type is it

mighty nebula
#

an array if i'm not mistaken

fallen trench
#

I'm slightly confused what ur trying to do, from your messages in #dev-general you had it working you just needed to pass an array to __instance.chitterSFX instead of a single value?

#

so it'd just be something like __instance.chitterSFX = [TestModBase.SoundFX[1]]; with the original code u had

fallen trench
mighty nebula
fallen trench
#

well u could also just do an array instead if u dont wanna bother updating c# version, the [] is just the newer syntax

mighty nebula
#

i have no problem on updating and since i started using c# 4 days ago i prefer updating

fallen trench
#

__instance.chitterSFX = new AudioClip[] { TestModBase.SoundFX[1] }; would be the older version