How to play an animation on click in Unity? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
All I want is to play a 2D animation when I click. The problem Is that I have no idea how the animator controller works.

After going to googles third page, I found a question with an answer which had animator.Play("anim"); and that finally worked. Of course I had to make the animation controller, but I didn't have to make any transitioning stuff. All i could see before is some complicated Animator Controller transitioning and too old code like animation.Play. Oh and I found that on freaking quora.com .

Related

Capturing mouse clicks in c# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed yesterday.
Improve this question
So, i am trying to create a very basic c# program, that just registers when the left mouse button is being held/pressed. I need this program to also be able to run over other applications, to register when you click while playing a game.
ps: im a complete beginner and have no clue what im doing.
i have looked through librarys but cant find one that would work

Problem with a loading bar in an unity game [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 hours ago.
Improve this question
I am currently facing a problem with a loading bar. I've seen the tutorial videos on how to make one in Canvas pretty easily. But my problem is that I don't need it in canvas, I need it to be like a GameObject that I could instantiate in a specific spot. Thanks in advance!

Unity Engine makes the sprite resolution terrible [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm new in gamedev and now trying my best in creating my first game. The problem is that i cannot understand why unity makes my sprites' resolution terrible. I've created a sprite which looks nice but once I try to start it in unity remote it hurts my eyes. I'll attach screenshots. I've read a lot about that problem but haven't found the solution yet.
How it looks like in unity
How I made it in AI
Press on the sprite in Unity and change the compression to NONE, if it's still a bit blurry try to change the filter or the wrap mode. Make sure that your sprite is in Texture type: Sprite 2d and UI

What does "myBody.velocity.y" mean? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would love to know what this is and how does it work on C# 2D unity game.
myBody.velocity.y
If you look the reference page you can see the following note at the bottom of the page :
Note: A velocity in Unity is units per second. The units are often thought of as metres but could be millimetres or light years. Unity velocity also has the speed in X, Y, and Z defining the direction.
Complete reference here

Make a musical note [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Is there any way to make a musical note in C# / javascript? So you specify frequency, pitch, etc. and it plays something?
C#, yes. JavaScript, not really (you could use Ajax and the HTML5 <audio /> tag but that's not really a great idea).
In C#, you would do:
Console.Beep(frequencyInHertz, durationInMilliseconds);
. There are also various other ways to do about the same thing.

Categories

Resources