The question is answered. OP unresponsive.
Force 2d audio in script (Unity 5)
Hi
I just upgraded from unity 4 to unity 5 and now all my 2D audio is 3D.
Is there a way to force that audio to 2D in the script?
Currently I use:
Instance.Play( clip );
But this plays the clip in 3D in Unity 5.
I know about the spacial blend setting, how to I set this in the c# script?
Thanks,
$$anonymous$$y audio sources are set dynamically at runtime, so I will have no idea which audio source will be 2D or 3D, so changing the spacial blend setting on the audio source will cause more problems. I need to set the spacial blend setting at the time the clip is played.
How the hell do you do it in script? I am having the same issue, why is no one able to answer this?
I've converted your answer to a comment.
If you have a solution, post an answer. In any other case, post a comment.
You can use google in most cases. :)
http://docs.unity3d.com/ScriptReference/AudioSource-spatialBlend.html
Lol, some people are lazy for google xD
Answer by MadDevil · Oct 20, 2015 at 12:50 PM
Thanks but, my question was on how you set the spatial blend in a script.
Thanks.