Sound Layers Setup (Unity Plugin)
Since v2.5, the PopcornFX plugin supports PopcornFX' sound layers.
Setup Sound Layer in PopcornFX Editor
- In the PopcornFX Editor, add a sound layer to your effect.
- Set the SoundPath to a sound file in your project.
- Bake your effect with dependencies. This should copy the sound file to your baked pack along with the other dependencies.
Setup in Unity
- Add a PKFxSoundManager component (from the PKFxManager assembly) in your scene.
- Attach your FX containing a sound layer to a PKFxFX component.
- Click "Assets > PopcornFX > Move Sounds From Pack to Resources".
This will scan the PackFX directory looking for sound files and move them to Assets/Resources/PKFxSounds so that Unity can play them.
You may need to refresh your project view for the sound to play along with your FX.
For every file moved, you'll get a log in the console.
- Hit play, see FX, hear sound, rejoice!