Reader small image

You're reading from  Unity 5.x Animation Cookbook

Product typeBook
Published inMay 2016
Reading LevelExpert
PublisherPackt
ISBN-139781785883910
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Maciej Szczesnik
Maciej Szczesnik
author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik

Right arrow

Using Animation Events to trigger sound and visual effects


This recipe shows a simple, generic way of playing different sound and visual effects with Animation Events.

Getting ready

To start, you need to have a character with one looped animation: Jump. We also need a sound effect and a particle system. We will need a transparent DustParticle.png texture for the particle system. It should resemble a small dust cloud. You can open the provided example Unity project and go to the Chapter 07 Special effects\Recipe 01 Using animation events to trigger sound and visual effects directory. In the Rigs directory, you will find all the needed animations, and in the Resources folder, you will find all other necessary assets. When you play the game, you will see a character playing the Jump animation. It will also play a sound effect and a particle effect when landing.

How to do it...

To play sound and visual effects with Animation Events, follow these steps:

  1. Import the character with the Jump animation...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Animation Cookbook
Published in: May 2016Publisher: PacktISBN-13: 9781785883910

Author (1)

author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik