Unity3D - Trigger animations (keypress trigger)

  Рет қаралды 161,569

CubicBrain

CubicBrain

Күн бұрын

Пікірлер: 312
@CubicBrain
@CubicBrain 6 жыл бұрын
using UnityEngine; using System.Collections; public class animController : MonoBehaviour { public Animator anim; // Use this for initialization void Start () { anim = GetComponent(); } // Update is called once per frame void Update () { if (Input.GetKeyDown("1")) { anim.Play("cubeAnimation"); } if (Input.GetKeyDown("1")) { anim.Play("New cube Animation"); } } }
@spencer7985
@spencer7985 6 жыл бұрын
What is the second if? the New cube Animation?
@praveenvinopv9929
@praveenvinopv9929 6 жыл бұрын
@@spencer7985 The second if statement is when we press 1 again it start play new cube animation in this case it is idle animation by this way we can start or stop animation
@apersonthatsucksatnames1133
@apersonthatsucksatnames1133 5 жыл бұрын
how do you make it stop when you let go?
@iamthewankerpants
@iamthewankerpants 5 жыл бұрын
@@apersonthatsucksatnames1133 Asking the real questions here
@dz_apollo
@dz_apollo 5 жыл бұрын
@@iamthewankerpants if (Input.GetKeyUp("1"))
@jakeshuman2102
@jakeshuman2102 7 жыл бұрын
literally an hour of forum reading didn't produce the quality of information this 6 minute video gave.
@CubicBrain
@CubicBrain 7 жыл бұрын
Thank you very much Jake. I really appreciate it.
@bevel1702
@bevel1702 6 жыл бұрын
Same!
@AGeekNamedRoss
@AGeekNamedRoss 6 жыл бұрын
Guessing... Udacity forum?
@MrCornerMan
@MrCornerMan 6 жыл бұрын
ikr i was searching forever before i found this
@IvyTeaRN
@IvyTeaRN 5 жыл бұрын
literally the same thing
@mindonwarp
@mindonwarp 5 жыл бұрын
As simple as I needed it. Thank you! For all of you looking for a way to play the animation only once and go back to the initial state: just go to the animation editor UI ("Animator" tab), right click on your triggered animation node and choose "Make transition". An arrow coming out of the node will show up. Just pull this arrow onto your initial/idle state node and that should do it (did for me).
@M4SKD
@M4SKD 4 жыл бұрын
THANK YOU SO MUCH IVE BEEN TRYING TO WORK OUT HOW TO DO THIS FOR AGES :)
@JohnJohnson-ox3bu
@JohnJohnson-ox3bu 3 жыл бұрын
Thanks dude
@xExplodingStarx
@xExplodingStarx 7 жыл бұрын
thank you for being so clear and to the point, really needed that.
@CubicBrain
@CubicBrain 7 жыл бұрын
Thanks a lot!
@jenniferlight5050
@jenniferlight5050 Жыл бұрын
thank you sir!! You have saved my life. This was like attemp 50 of trying to get my door to open.
@sergioborrallo7424
@sergioborrallo7424 3 жыл бұрын
I checked your profile, I see that you don't make videos anymore. I really regret it, I think you explain extremely well. Thank you for your effort and time!
@brealz5351
@brealz5351 7 жыл бұрын
Incredible.. Fast and to the point, great tutorial !
@CubicBrain
@CubicBrain 7 жыл бұрын
Thanks a lot!
@007walk
@007walk 6 жыл бұрын
Thanks for this. This is a much simple way of implementing what i wanted. For some reason my animation kept transitioning to the previous state with when using the trigger, but this just saved me a bunch of time. Thanks again.
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Rodane, thanks for your feedback, I'm glad you liked it.
@xeon5259
@xeon5259 3 жыл бұрын
this is a very outdated tutorial, but still works for me, thanks to your easy,simple, to the point explanation. ThankYou!
@r0y1t07
@r0y1t07 4 жыл бұрын
I like videos like this, no longer than 10 minutes and direct to the point :)
@gabrielbuchala7798
@gabrielbuchala7798 7 жыл бұрын
The key to a good tutorial is to communicate in a clean, precise and efficient way. This video hit the nail on the god damn head. I'm sure this video is going to help a lot of people, keep up the good work.
@CubicBrain
@CubicBrain 7 жыл бұрын
Thank you so very much. I really appreciate your comment. Its comments like these that really give me the drive to continue making these tutorials.
@a-vena
@a-vena 3 жыл бұрын
Finaly i found this Tutorial. Thanks
@tristunalekzander5608
@tristunalekzander5608 4 жыл бұрын
After several minutes of searching, this was exactly what I needed, thank you!
@oofusmcdoofus
@oofusmcdoofus 4 жыл бұрын
Me too
@ligrens
@ligrens 4 жыл бұрын
Several hours you mean.
@СтепанЛутошкин-о8ю
@СтепанЛутошкин-о8ю 4 жыл бұрын
You are the best! I was looking for the solution for 4 hours! Thank you so much!
@kristophia7310
@kristophia7310 4 жыл бұрын
i lost my sanity before i found him Psychological factors that may contribute to mental illness include: Severe psychological trauma suffered as a child, such as emotional, physical, or sexual abuse. An important early loss, such as the loss of a parent. Neglect. An important early loss, such as the loss of a parent. - button plays animation gone, Neglect. sources cant help i am only joking
@RUDERUDYTUTORIALS
@RUDERUDYTUTORIALS Жыл бұрын
Still helpful in 2023 thank you very much for your support.
@ZekaProf
@ZekaProf 5 жыл бұрын
well i was trying for ages to get my main menu animation to work with overwhelming solutions but yours was the simpliest and the most precise
@clintstapleton2289
@clintstapleton2289 5 жыл бұрын
This is exactly what I needed thank you!
@oviroysarker8066
@oviroysarker8066 4 жыл бұрын
You have saved my unity carrier!!!!!
@Zukomazi
@Zukomazi 5 жыл бұрын
Works like a charms Nice and simple
@sbdesigns4999
@sbdesigns4999 5 жыл бұрын
Great! I had been looking for a really direct and simple example and here it is! Thank you :)
@AstrusHD
@AstrusHD 5 жыл бұрын
Awesome Tutorial, it helped me so much. Thank you!
@RUDERUDYTUTORIALS
@RUDERUDYTUTORIALS Жыл бұрын
It's really helpful right.
@itay7884
@itay7884 4 жыл бұрын
Thank you! after 4 years I could not find a better guide!
@RyanRioga
@RyanRioga 6 жыл бұрын
Anyone who might find an issue where the animation will not trigger, Add (KeyCode.1) (I used 'Q' for mine) to the code after GetKeyDown. Other than that, super helpful video! Checked a lot of forums and whatnot and found nothing helpful. Nice job dude.
@CubicBrain
@CubicBrain 6 жыл бұрын
Thank a lot, and good tip!
@kapex6405
@kapex6405 3 жыл бұрын
Awesome tutorial have had trouble with this for like a year or so :D
@kapex6405
@kapex6405 3 жыл бұрын
Also this was super easy to customize
@haru_ne_
@haru_ne_ 4 жыл бұрын
I wanted to know how to use Trigger parameters but I figure it out anyway. Thanks.
@leeli9243
@leeli9243 5 жыл бұрын
thank you very much! It's nice and easy to understand
@og_shrug
@og_shrug 4 жыл бұрын
Man this vid helped me get into a club (coding C# and unity) . Thnx
@animeboy93
@animeboy93 6 жыл бұрын
I hope this one finally helps me with my animation troubles. Been trying to work this stuff out for days. I keep seeing videos where they set the Boolean or trigger and the animation just works.
@modernistt
@modernistt 6 жыл бұрын
used for my gun game. Thanks very quick and straight to the point.
@kieronrana5233
@kieronrana5233 4 жыл бұрын
great video! straight to the point, literally that easy. thanks for your help :)
@tassodemo2316
@tassodemo2316 4 жыл бұрын
If you press it once, it goes forever. If you turn off the loop, it only plays once.
@garlicbread1575
@garlicbread1575 3 жыл бұрын
yes but how do you turn off the loop?
@ImGodz0
@ImGodz0 5 жыл бұрын
how can i stop an animation on releasing button and go back to idle animation in void update?
@praveenvinopv9929
@praveenvinopv9929 6 жыл бұрын
Thank you brother you earned 1 subscribe i found many video regrading to this lesson but all the video was difficult and yours was just asweome keep it up and kindly keep us to know this kind of short tricks
@CubicBrain
@CubicBrain 6 жыл бұрын
Thanks a lot. will do.
@darkhackerstudio8112
@darkhackerstudio8112 4 жыл бұрын
How do you make it so that when you release the key it stops the animation
@Normal_Norman
@Normal_Norman 6 жыл бұрын
Cheers, worked first time!
@onatunlu5158
@onatunlu5158 6 жыл бұрын
Thanks dude It fixed my problems.
@BogdanAndreiRO
@BogdanAndreiRO 4 жыл бұрын
Thanks a lot man, you helped me so much!
@shauryakumar306
@shauryakumar306 3 жыл бұрын
@CubicBrain Thanks you really showed me how it's done.
@Nikoplays0910
@Nikoplays0910 5 жыл бұрын
Thanks, now I can play the orange justice animation
@Dennis10Paulino
@Dennis10Paulino 7 жыл бұрын
Very simple and effective, thanks!
@CubicBrain
@CubicBrain 7 жыл бұрын
Thanks man!
@AwsomeDragon
@AwsomeDragon 5 жыл бұрын
Excellent tutorial, thank you so so so so much!!
@Yu0nes
@Yu0nes 6 жыл бұрын
Thank you man very good tutorial
@CubicBrain
@CubicBrain 6 жыл бұрын
Thank you very much.
@aksovicdalibor998
@aksovicdalibor998 4 жыл бұрын
+CubicBrain Do you, by any chance, remember what key combo u did at 4:40, to jump right into Start function? Looks super useful for bigger projects.. Thanks for video, helped a lot.
@darkexior
@darkexior 5 жыл бұрын
succinct and precise, awesome!
@CubicBrain
@CubicBrain 5 жыл бұрын
thanks!
@starnightstudios
@starnightstudios 7 жыл бұрын
Guys, I figured it out. To make it so the animation can be repeated is this Void update() { If(input.getbutton("Fire1") { Start Coroutine(EnterTextHere()) } Ienumerator EnterTextHere() { _anim.Play("animnamehere") yield return new WaitForSeconds(delay); _anim.Play("YourDefaultState") }
@juankacoolx0
@juankacoolx0 4 жыл бұрын
You are the best one
@kkrazius
@kkrazius 6 жыл бұрын
Thank you, it worked just fine!
@Lord_Piccolo
@Lord_Piccolo 5 жыл бұрын
Thanks, dude. It is useful.
@leongrigoruk
@leongrigoruk 6 жыл бұрын
One of the best
@CubicBrain
@CubicBrain 6 жыл бұрын
Thanks. appreciate it.
@asklapios
@asklapios 3 жыл бұрын
thank you so much about this training
@hackersitoxd9689
@hackersitoxd9689 4 жыл бұрын
GREAT TUTORIAL!
@DAvitArm
@DAvitArm 4 жыл бұрын
Thanks man you save me :)
@ChuckyMaster
@ChuckyMaster 5 жыл бұрын
thank you bro really help ful
@alejandrozamora3468
@alejandrozamora3468 5 жыл бұрын
Thank you, very helpful
@alirazahaider7108
@alirazahaider7108 2 жыл бұрын
What if there were Different animations to be played on different objects then how will we be able to do that?
@Skullcat2212
@Skullcat2212 4 жыл бұрын
How can i trigger an animation when pressing a hud button?
@tomcruz8615
@tomcruz8615 7 жыл бұрын
Quick question. What would you use to trigger two animations with the same key? (Sounds like a dumb question but i'm a unity newb so whatever).
@kaldo_kaldo
@kaldo_kaldo 7 жыл бұрын
I'm not sure if you can play two animations from the same controller (anim here) at the same time. Either way, you would simply call another thing in the if statement where the anim.Play(); is called already. so it would read like anim.Play("clip1"); anim.Play("clip2"); That is, if you can play two from the same one. If not, you'll need two animator controllers and would call anim1.Play and anim2.Play back to back in the if statement.
@tomcruz8615
@tomcruz8615 7 жыл бұрын
Nick Miller ohhh I'll try both of those out. Thank you for that
@Mr09shaggy
@Mr09shaggy 6 жыл бұрын
Thanks for the video :)
@TheRealArtDoctor
@TheRealArtDoctor 3 жыл бұрын
hey man i have one small issue the code error says aplay has no definiton
@rickfuzzy
@rickfuzzy 6 жыл бұрын
Excellent. Feel like i just leveled up
@CubicBrain
@CubicBrain 6 жыл бұрын
Awesome! happy that it helped you!
@SavanaStudios
@SavanaStudios 7 жыл бұрын
Helped alot! Thanks!
@jazminajelani8395
@jazminajelani8395 6 жыл бұрын
hye, i want to create a game where player will be given 2 button and if they click on wrong answer button there is animation will play and vice versa. but i dont know how to code the button to play the timeline because the animation is in the timeline. could u please help me?
@sanjaychowdappa6306
@sanjaychowdappa6306 5 жыл бұрын
Thanks a lot sir u have best solution
@AzoozePvP
@AzoozePvP 4 жыл бұрын
Thanks Bro, but i have problem i use void OnTriggerEnter () { text.SetActive (true); if (Input.GetKeyDown(KeyCode.J)) { anim.Play ("Door_Move"); Sound.SetActive (true); Destroy (rope); Destroy (text); } but the anim not run just if i Change void OnTriggerEnter ---> void Updata will run anim )': i want the animation run if i click in button onTrigger how? and thanks you
@theotherone0101
@theotherone0101 7 жыл бұрын
how can i do it. if it just should play the animation 1 time ?
@CubicBrain
@CubicBrain 7 жыл бұрын
Click the animation in the project field, and uncheck "Loop time", in the Inspector.
@100percentpodcasts7
@100percentpodcasts7 6 жыл бұрын
Cheers
@official420er
@official420er 6 жыл бұрын
but after activating the animation once, i cant do it after that.. could this be solved?
@rajjaiswal1606
@rajjaiswal1606 6 жыл бұрын
Zuchini DE sorry for late reply but in update use the following code If(Input.GetKeyUp("1")) ( anim.play("name of animation") = false ) If not use this one If(Input.GetKeyUp("1")) ( anim.stop("name of animation") ) Or use this one by making another animation which has nothing transformed and write If(Input.GetKeyUp("1")) ( anim.play("name of animation1") )
@official420er
@official420er 6 жыл бұрын
thanks alot
@berkaybakacak
@berkaybakacak 6 жыл бұрын
Thnaks dude. You are great :)
@CubicBrain
@CubicBrain 6 жыл бұрын
Thanks, glad you liked it.
@jimmsdesign-freelancegraph1549
@jimmsdesign-freelancegraph1549 5 жыл бұрын
I was hoping you may be able to help. I followed your tut but tailored one or 2 bits but I'm getting this error - MissingComponentException: There is no 'Animator' attached to the "Player" game object, but a script is trying to access it. You probably need to add a Animator to the game object "Player". Or your script needs to check if the component is attached before using it. - I have attached the script to both the player and the object but it still throwing back this error. Do you know what I could be doing wrong?
@joshuamason2227
@joshuamason2227 5 жыл бұрын
attach animator
@silvanacallegari
@silvanacallegari 6 жыл бұрын
you are AWESOME!
@CubicBrain
@CubicBrain 6 жыл бұрын
Thank a lot.
@LeCigareVolant
@LeCigareVolant 6 жыл бұрын
Did you ever know that you're my hero? -Bette Midler
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi. Thanks a lot.
@jirahmarienavarro8701
@jirahmarienavarro8701 3 жыл бұрын
What if I just want it to rotate one time and it should disable any more movement?
@Jaydanson
@Jaydanson 7 жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; public class animcontroller : MonoBehaviour { public Animator anim; // Use this for initialization void Start () { anim = GetComponent(); } // Update is called once per frame void Update () { if (Input.GetMouseButtonDown("0")) anim.Play("ReadSwing01") } That's what the script is supposed to look like right? Because i keep getting errors
@CubicBrain
@CubicBrain 7 жыл бұрын
You need closing } for tour update method and class (two of them at the end of your script).
@HDMaco13
@HDMaco13 6 жыл бұрын
You need to remove the -> " " in if (Input.GetMouseButtonDown("0")) It should look like if (Input.GetMouseButtonDown(0))
@VindicatorMorty
@VindicatorMorty 7 жыл бұрын
Great tutorial but after reading the title i thought you gonna use the anim.SetTrigger("TriggerName"); Method in addition with transitions.
@CubicBrain
@CubicBrain 7 жыл бұрын
Thanks!
@camy_dev
@camy_dev 7 жыл бұрын
I really loved this thanks man I used it with a trigger to make a script to play when I'm in a trigger, but I was wondering how I specify in the script that i only want it to play once, in other words i have a dresser that moves when I press e near it but i only want you to be able to play this animation once otherwise you can move the same dresser over and over again any help would be appreciated thank you so much already though.
@CubicBrain
@CubicBrain 7 жыл бұрын
The simplest solution would be to set a transition within the animator, to either the exit state, or a new idle state.
@CubicBrain
@CubicBrain 7 жыл бұрын
you can also check the reply to ewwitsantonio question answered by xXpandatree12Xx10. He added a nice three step guide.
@camy_dev
@camy_dev 7 жыл бұрын
Thank you got it lol
@MrJacky
@MrJacky 5 жыл бұрын
Omg thank you so much !!!
@310thebank
@310thebank 6 жыл бұрын
how about if we want our player collider with trigger box and play animation not press key button how we must change code
@jasielt.2006
@jasielt.2006 4 жыл бұрын
hey i dont know if you can help me but whenever i press the button to do the animation it stays frozen at the end of the animation and dosent transform back to its orignal state and says Katana AnimationEvent has no function specified
@CubicBrain
@CubicBrain 4 жыл бұрын
Hi Jasiel, You can add a transition to an idle state in the animation, or make the animation loop. Animations are a bit like video playback, and will just stop at the last frame.
@joshuaheejd
@joshuaheejd 7 жыл бұрын
I need some help with double keypress trigger animations? Meaning when i press e.g X, 1 thing happens and then when i press Y another thing happens to the same model. Are there any tutorials on this?
@ashoan8965
@ashoan8965 7 жыл бұрын
What about uh, this is for my car game... I want a door to open and stop on the press of a key, and if pressed a second time, it reverses, the door would close, like if the animation is reversed and stop like it did when opening the door. hood trunk it could be anything.
@2ndpersonshooter713
@2ndpersonshooter713 6 жыл бұрын
Thanks, is useful!
@lavasilk1671
@lavasilk1671 2 жыл бұрын
THANK U SO MUCH :D
@iTapClashRoyale
@iTapClashRoyale 7 жыл бұрын
Why doesn't Visual Studio recognize "Animator"???
@samu-rai983
@samu-rai983 5 жыл бұрын
YEAAAAHH WHYYYYY THEE FFUUUUUCK NOOT
@drgitgud
@drgitgud 6 жыл бұрын
@CubicBrain hello i´ve googeled for like 2 days now but i cant find any answers so i may bother you ^^ im looking for an animation on an instantiated object, my problem is as i set the animation up (just going up on the y nothing more) it takes the x and z axes aswell and my onmouse instantiate doesnt work anymore. the object doesnt spawn where i click instead all the clones spawn at the set up x and z values. i want to make a spell where the player raises a wall from the ground kinda like earthbender styled but i cant get it to work. thank you so much in advance if you actually answer it would make my day :) peace
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi, I'm not sure how you would achieve the functionality that you are looking for. but, have you tried posting on the Unity3D forums? They are always willing to help.
@drgitgud
@drgitgud 6 жыл бұрын
i had to place my wall into an empty gameobject to ignore its transform. my object was spawning right where animated it in the scene so it took the x and z values with it to avoid using them parent it. thanks :)
@vlad-cristiansecatureanu6820
@vlad-cristiansecatureanu6820 5 жыл бұрын
I want to make it so that you can press the button multiple times a knob moves further like one step at a time. Is it posible to do it with only one animation, or do i need one for each step of the knob? pls reply
@CubicBrain
@CubicBrain 5 жыл бұрын
Hi, well you could play a part of the animation, but that setup would probably be a bit complex. if you create a bunch of takes/animation you could play them back and use basic if statement setup to see how far along the line you are. however if its simple movement you are going for. I would suggest just scripting the movement of the gameobject. this post might help you: answers.unity.com/questions/667641/how-do-i-move-my-2d-object-using-arrow-keys-also-h.html
@icantth1nkofanam40
@icantth1nkofanam40 4 жыл бұрын
mine only works once then it doesnt trigger after that
@BojanVasilev
@BojanVasilev 6 жыл бұрын
hello great tutorial but how can i make when i press again to animation stop and if i press again animation start again
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Bojan, You will have to set up an if statement, that looks for the animation state (which animation is currently playing.)
@jaincoff9561
@jaincoff9561 7 жыл бұрын
Great..Great tutorial, my thanks
@CubicBrain
@CubicBrain 7 жыл бұрын
Thanks!
@nibernator
@nibernator 6 жыл бұрын
For some reason I am getting an error: Invalid Layer Index '-1' I did everything exactly like the video, no dice...
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi, please double check your namings/case-sensitiviness for the animations etc. could you post your code?
@nibernator
@nibernator 6 жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; // THIS SCRIPT NOT WORKING public class animController : MonoBehaviour { public Animator anim; // Use this for initialization void Start () { anim = GetComponent(); // caches controller at start. } // Update is called once per frame void Update () { // string reference //check for key press if (Input.GetKeyDown("1")) { print("Key Down"); // To test if input responds to key. anim.Play("cubeAnimation"); // Plays the animation asset named cubeAnimation. } } }
@nibernator
@nibernator 6 жыл бұрын
These are what the errors say, "Animator.GotoState: State could not be found UnityEngine.Animator:Play(String) animController:Update() (at Assets/animController.cs:22)" The other error: "Invalid Layer Index '-1' UnityEngine.Animator:Play(String) animController:Update() (at Assets/animController.cs:22)" Thanks for your time!
@CubicBrain
@CubicBrain 6 жыл бұрын
I'm thinking it could be one of two things. It might be that the animator hasn't been added to the field in the inspector, or that the naming of the specific animation state (the animation you want to play back) isn't correct?
@karanveermultani6594
@karanveermultani6594 4 жыл бұрын
I know this comment was a year back but I found out what was wrong. There is an extra if statement in the update. Remove the one that plays "New cube animation" and you won't get the error anymore. The code in the comments has this, so please do mind changing it.
@Ciroisnthere
@Ciroisnthere 2 жыл бұрын
THANK YOU U DA BEST
@omengaming2019
@omengaming2019 3 жыл бұрын
nice work
@tomektomek1466
@tomektomek1466 5 жыл бұрын
LOVE YOU MAN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ミフヒヨ
@ミフヒヨ 7 жыл бұрын
soo i can direct animation like that using while for example walk while pressing w ?
@Conmac
@Conmac 6 жыл бұрын
PLEASE HELP! I have a running animation and an idl animation, once i press 1 to trigger another animation, after its done none of the other animations work? Help
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Conmac. does any of your animation go to the exit state?
@Conmac
@Conmac 6 жыл бұрын
CubicBrain I have figured it out! But thanks for responding bro
@CubicBrain
@CubicBrain 6 жыл бұрын
okay, great.
@vicuna4036
@vicuna4036 5 жыл бұрын
How can i let it play one time and it will automaticly go back to emphty state?
@emilyallen7912
@emilyallen7912 Жыл бұрын
It won’t let me add a new state when I right click it just says add behavior
@pablogomez3308
@pablogomez3308 5 жыл бұрын
Thanks very helpfull!
@talalmeshari9573
@talalmeshari9573 6 жыл бұрын
Thank you so much.
@IvyTeaRN
@IvyTeaRN 5 жыл бұрын
a legend of the game subscribe for you
@CubicBrain
@CubicBrain 5 жыл бұрын
thank you very much.
@felax5410
@felax5410 4 жыл бұрын
its work thx :)
@Shardey
@Shardey 6 жыл бұрын
Assets/animController.cs(19,19): error CS1502: The best overloaded method match for `UnityEngine.Input.GetMouseButtonDown(int)' has some invalid arguments
@garlicbread1575
@garlicbread1575 3 жыл бұрын
how can I play the animation while holding down the key then stop the animation when not pressing the key
@CubicBrain
@CubicBrain 3 жыл бұрын
you might be able to make a stop/pause animation with: if (Input.GetKeyUp("1"))
@garlicbread1575
@garlicbread1575 3 жыл бұрын
@@CubicBrain thanks it works
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 722 М.
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 26 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 6 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 1,7 МЛН
How to Pick Up + Hold Objects in Unity (FPS)
3:42
JonDevTutorials
Рет қаралды 29 М.
UNITY TUTORIAL - Switch Animations by Clicking on Buttons
6:32
Caffeinated DragonWare
Рет қаралды 3 М.
TOUCH CONTROLS in Unity!
16:09
Brackeys
Рет қаралды 1,3 МЛН
I Turned a PS4 into a Handheld Console
27:40
Restore Technique
Рет қаралды 309 М.
Playing Animation on Trigger in Unity
9:04
SpeedTutor
Рет қаралды 159 М.
The Fast Way to Code C# and Setup Animations in Unity
16:13
Filmstorm
Рет қаралды 221 М.
Epic's Unreal Optimization Disaster | Why Nanite Tanks Performance!
13:07
Threat Interactive
Рет қаралды 223 М.
Get Started With Unity - The Animator
12:40
Dapper Dino
Рет қаралды 18 М.
How Two People Created Gaming’s Most Complex Simulation System
38:54
ThatGuyGlen
Рет қаралды 1,4 МЛН
Isometric Game Tutorial - Pros and Cons, Art, Movement
11:16
Tamara Makes Games
Рет қаралды 129 М.
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 26 МЛН