Hello!
I have been working on an interaction where I need a video and an animation to play at some point during it.
The video plays, but the audio doesn't. I checked the include audio box and put my original audio for the clip as my audio source, but it still doesn't play.
The animation clip doesn't play at all. I have tried many different ways to get it to work, but I can't seem to figure it out.
http://imgur.com/a/PG2j7If you have any suggestions for either of these questions I would really appreciate it!
Comments
Check that the audio source is working correctly by having it play a sound outside of the video with the Sound: Play Action. It may be that the Spatial blend setting needs to be set to 2D or something. Also check the volume of your AudioSource component at runtime - if it's linked to AC's sound volume, then you'll need to ensure your SFX volume is turned up.
Use the Animator component for playing animation - the Animation is Unity's legacy system and is now outdated. Create your animation, make an empty clip the default, and create a trigger parameter that plays the animation when triggered. These steps can be done outside of AC, and you can test it out by triggering the parameter manually in-game from the Animator window. Once it works outside of AC, you can use AC's Object: Animate Action to trigger the Mecanim parameter.
The audio is working now.
I tried to make the animation play with a trigger, but I have been having issues with triggers not working as well and I can't seem to get it to play that way either.
http://imgur.com/a/gHFLz
The Trigger prefab you have in your scene is set to Block Gameplay - change the When running field to Run In Background to avoid interuppting player movement.
Your Object: Animate Action has no Clip assigned, so it won't play anything. If you switch to the Mecanim/Animator system I mentioned above, and create the Trigger parameter inside your Animator window, change the Action's Animation engine field to Mecanim - this is the system that makes use of trigger parameters. You'll then be able to enter in the name of the Trigger parameter to have it triggered.