animation 2d platformer

hey guys, me and my mates are aking a 2d platformer game. and we have a plane with our image. We have all our drawing for jump and run but we need a script or a how to so we can change to the picture OnButtonDown and go back to the original picture OnButtonUp? and whilst the picture has changed have an animation sheet activated so the character looks like its walking. i know this is a mouthfull but any and all help is welcomed

You can make a plane object with your drawing as texture and changing it with a script, I think that there is some tutorial in the wiki that you can search

You can do sprite sheets… there is code somewhere on here, I have used it before… but if the animation isn’t huge, you can simply change the textures (have several different png images for each sprite). I have done that for my racing game. Just have a loop that cycles through the different textures with a set amount of time between each change for, say, walking. It’s pretty simple… take a look at the Unity scripting reference for how to set textures through code. Cheers!