Unity 5 requires () reference now.
Added that, nothing difficult.
What happens is SFX overlaps the music playing. No sfx sound heard, but music’s pitch bends for 0.5 seconds.
(I have 2 objects in a scene, SFX and MUSIC, both with audio sources. Priorities are set to 128 and 127)
In unity 4 used
gameObject.Find("sfx").audio.PlayOneShot(sfxSound);
Now it doesn’t work. Why?
Found out myself.
SFX problem:
I did use 32-bit *.wav files.
Unity 5 wants you to decode all of those to either 24 or 16 bits.
Music bend problem:
Music bend was caused by Main Camera movement. Unity 5 has new parameter called “Spatial blend”. After updating from Unity 4 to 5, all audio source objects set it to 3D (default).
try it
GameObject.Find(“sfx”).Getcomponent(AudioSource).PlayOneShot(sfxSound);