K
K
Kirill Kichigin2017-04-07 21:18:09
Unity
Kirill Kichigin, 2017-04-07 21:18:09

How to enable animation for an object on pressing the E button?

I have reviewed many tutorials and read answers in many forums.
But unity 5 refuses to play the object's animation on click.
I have already tried many ways but all in vain.
I already wrote a script, but unity demolished everything there and wrote it as it should,
but that didn’t work either.
Please tell me how to do it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Gaydak, 2017-04-08
@KiR_Ka

If you are talking about a simple animation, not an animator... Have you
tried just Play On Awake?
If it works through Play On Awake, the name was incorrectly specified.
If it still doesn't start, then look here How to play animation from code in Unity3D?

G
GavriKos, 2017-04-07
@GavriKos

Exact description + code of your attempts - to the studio. Ideally - a project for an exchanger.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question