I’m trying to trigger a 2-d sfx in my game via script and can’t figure out how to do so. I’ve had no problem triggering 3-d sounds, and the portion of my script is getting called, but I get an error about an object reference not being set to an instance of an object.
I have the 3d box unchecked in the Audio importer options. Is there a certain script function I need to call to let the engine know not to attach the sound to a GameObject, but let it play in 2d? (I’m currently scripting in C#, but can probably translate javascript if you have an idea). thanks for any help!
thanks for the clarification. I’ve set up another sound to stream from the internet. It plays, but it’s playing positionally. Is there a way to make a streamed sound play 2-d? I can set the audioSource to min and max volume of 1 and a rolloff of 0, but the sound still moves based on the position of the GameObject I have my AudioSource and script attached to. any help would be greatly appreciated.