Search Unity

Play audio loop during animation. ?

Discussion in 'Scripting' started by GWPGearWorx, Sep 21, 2008.

  1. GWPGearWorx

    GWPGearWorx

    Joined:
    Apr 29, 2007
    Posts:
    336
    Hey all;

    I am not a coder at all, I am a 3D guy, so I am messing around with the 2D Platform tutorial testing some of my assets in a proof of concept... Just to see how it would come together ;)

    As I mentioned I am using the 2D Tutorial Resource, and when the character idle animation is playing I would like an audio file to play and loop during it..

    So say the player is walking and then stops, the idle animation plays, thats when I want the audio to play and loop. Then the player walks, that audio stops.

    Does anyone have a code sample or explain to me how I would go about that?

    Kind regards;