How it works...

We are using one important feature of Animation Events in this recipe: the possibility to pass a stringint, or float parameter to our script's functions. This way we can create one function for playing all the sound effects associated with our character and pass the clips' names as string parameters from the Animation Events. The same concept is used for spawning the Dust effect.

The Resources folder is needed to get any resources (prefab, texture, audio clip, and so on) with the Resources.Load(string path) function. This method is convenient for loading assets using their names.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.226.79