Last updated: Sep 7, 2022
The Play Sound Behaviour State Machine Behaviour plays a sound whenever the Animation State it’s on starts playing. This is very helpful when playing things like aim-in and aim-out sounds, or jumping sound effects…
This component makes use of our IAudioManagerService implementation to play a sound. This implementation is accessed through our ServiceLocator script.
You can find the Play Sound Behaviour at this path: Assets\Infima Games\Low Poly Animated - Modern Guns\Demo\Code\Animation\PlaySoundBehaviour.cs
Clips. Array of AudioClip values to pick from when trying to play a sound through this component.
Settings. Settings applied to the AudioClip played when the Animation State this component is on starts playing.
Audio Manager Service. Reference to our audio playing service.
Last Clip. Last clip played through this component. This is very important so we can delete that last GameObject we created when exiting the state.