- Home /
Get information from variable
Hello! My question is how can i get data out of the variable example:
If i have an var and a script that makes so when i push a button an animation plays, i normaly use Animation.Play("Animation"); but how can i make so the code uses the name of the animation that is dragged into the variable.
Regards Stian
Comment
Best Answer
Answer by taxvi · Dec 16, 2014 at 07:08 PM
var animationName = "WalkAnimation";
Animation.Play(animationName);
Your answer
Follow this Question
Related Questions
Play animation function 0 Answers
How to run an animation clip on button down-hold? 1 Answer
Animation does not transition 0 Answers
Perform Action on frame/time of animation 1 Answer
Countdown code not working 1 Answer