Hi Everyone,
Im fairly new to unity but have a fair knowledge of programming.
I have made an animation with mechanim using a flashlight model that is a fbx file. It contains a spotlight which I use code to toggle it on and off with some code. I have a default animation that doesnt animate anything but is linked to and animation on a condition that a bool is false.
I want to be able to press “f” the toggle button in the code to turn the bool false or true, so from there it should play the animation ? Ive tried everything but it says the animation needs to be marked as legacy or something ?
I’m so confused any help will be appreciated!
[18639-screen+shot+2013-11-28+at+1.35.03+pm.png|18639]
[18640-screen+shot+2013-11-28+at+1.37.06+pm.png|18640]
assuming I'm understanding things correctly here, tanoshimi is saying anyone who wants to make a light pulse like this, should put the script he linked to on that light, and edit the line that says: transform.localScale.y = volume * rmsValue; to instead say: transform.GetComponent.<Light>().intensity = volume * rmsValue; you might also have to add a multiplier of some sort or clamp the value in some range to get the right effect, which you can add to the end of that line.
– MasterGalaxy