Hi there, Im just simply trying to change a parameter with,
public void Death()
musicEv.setParameterValue(“Death”, 1f); //returning null on this line
However it is returning a null reference exception and I cant seem to figure out why. When I move the setParameterValue line into the Start() function of the same script it works fine which initially made me think that maybe my Death() function wasnt being called properly when the player died. Yet when using Debug.Log the function is being called fine! so why is Unity returning the line musicEv.setParameterValue null in the Death() function and not in the Start() function?
Anyhelp would be very much appreciated as im working to a deadline and this has been an uneccesary bump in the road, I’ve been staring at this line all day trying to trigger the parameter change in numerous ways and still have come up with nothing.