0:25 scroll down and and find something specifically called input actions. The way he edited it makes it look like he clicked on player mask. Dont.
@MrLuckyLISS8 ай бұрын
Thx, man
@uw6de6 ай бұрын
Yes, it took me a while to figure out what the fuck he did there.
@WalacaVencano15 күн бұрын
OMG thank you so much otherwise I would be hardstuck.
@tegxi11 ай бұрын
Love how concise this tutorial is! Much better to lean too fast than too slow, as pausing will likely be needed either way and it's better for the information to be presented quicker.
@chonkgames11 ай бұрын
I'm very glad you liked it! 🤗
@TechBoxNorth Жыл бұрын
All this just to tell a 2d object that I'm clicking on it!? omg! Video was to the point and easy to follow, thanks for sharing!
@Pentaxant11 ай бұрын
when clicking once, tell the input system to wait for half a second or so, if there has been another click on that half second, count it as a double click
@Axwitech Жыл бұрын
Great, short and informative video. Please make more. I'd like a similar style video regarding Unitys UI system and how to make simple UI elements.
@turtlecabaret10 ай бұрын
this is my fav tutorial yet tysm! how do you achieve the 'bouncing' effect on click that you display at the end of the video? I want when an object is clicked on in my scene for the colour of it to change, I'm wondering if it's best to replace the sprite image with a differently coloured sprite image or if that can be done within Unity on the original image? tysm!!
@Weeniehutnurse Жыл бұрын
This helped me out so much, and was a lot easier than the code I was making for clicking objects. Now I'm going to do a drag and drop with it.
@jonathangarciarodriguez124010 ай бұрын
This is really nice. Do you think you can do a touchscreen variant on 3d?
@bumbljumbl44812 ай бұрын
0:25 If you just installed the input system make sure to restart Unity otherwise you won't get the input actions button when trying to create it
@chonkgamesАй бұрын
Great tip for everyone!
@Ugeen-Huge-Jeans10 ай бұрын
So there is no way to use the old OnMouse - events with the new input system anymore? Or something similar?
@alexpompon382 Жыл бұрын
in the "Player input" component in "Events/Gameplay/Click(CallbackContext)" it doesnt show up the "On click" funtion. However it shows "No function" and Mono script
@MoonRabbit_EN Жыл бұрын
It just happened to me too. You missed the part where InputHandler script needs to be attached to InputHandler game object (1:06) and then in the Player Input component you need to assign your game object's Input Handler component, not the script. Whenever you see "No function" and Mono script, you know you assigned the script itself instead of a component.
@MagicCubeWorldАй бұрын
For me this happened because I forgot a semicolon in my InputHandler script. Fixed it, saved, it's there now.
@lonk199 Жыл бұрын
I'm getting this error: NullReferenceException: Object reference not set to an instance of an object when I double click it it goes to the line where I create the variable rayHit
@Sukhmnn_Preet9 ай бұрын
Did you find a fix
@ALFaer-l5p3 ай бұрын
@@Sukhmnn_Preet Do Camera "public" and add your Camera object there. It will fix this problem.
@mendo1522 Жыл бұрын
I LOVE YOU. Such a good, short video that gets you up and running.
@chonkgames Жыл бұрын
Aww, thank you! 🤗
@Coltingtons9 ай бұрын
0:24 what did he click on in the create menu I can't see even on .25 speed
@sancho82379 ай бұрын
It's called "Input Actions" it's at the very bottom of the list, you might have to cliick a little downwards arrow in order for it to appear
@srishtijitpure90829 ай бұрын
@@sancho8237 I don't find it
@tilum83426 ай бұрын
@@srishtijitpure9082 Restart Unity
@tahmidtarique60772 ай бұрын
@@srishtijitpure9082 Same. Did you find it?
@halinek771311 ай бұрын
Nice tutorial! But how to change it to work with holding mosue button, not only clicking once?
@Alex-e-Azam Жыл бұрын
getting this error: error CS0234: The type or namespace name 'Remoting' does not exist in the namespace 'System.Runtime' (are you missing an assembly reference?)
@jethrolemons1246 ай бұрын
I am new and really would like if this is easier because when i try to find a "touching mouse?" vid i can't find one so please make a simple video for beginners
@DexterCrappell11 ай бұрын
The code didn't work for me. it is full of errors but i did exactly what you said.
@MightyBlow11 ай бұрын
can this be used to create an anti-auto-clicker?
@kabukidanshi7874 Жыл бұрын
Thank you so much! It worked on the first try 😁
@chonkgames Жыл бұрын
I'm very glad to hear that! Thank you!
@OwenLake-zw4bn Жыл бұрын
how would you modify the code to work for touch inputs
@Talonos25 ай бұрын
Yeah, he hard-coded the input handler to look at the mouses position. You can add a binding to the "Click" function to make it so that a touch input can fire the event... but then the event looks at where the mouse is, not where the event took place, so if you don't have a mouse, it wont work right. :/
@shadow_lev-9652 Жыл бұрын
it doesnt work, it just doesn't hit the collider (it IS set on the gameObject)
@noisyminer Жыл бұрын
Check "Active Input Handling" in player settings and make sure it is set to new input system
@shadow_lev-9652 Жыл бұрын
@@noisyminer i fixed it by just changing the rendering layer of the background (I saw that, when I applied a sprite to my invisible collider)
@ElysianAura10 ай бұрын
@@noisyminer Holy shit thank you. I was bashing my head on why this project wasn't working at all when I had just used the new input system on my last 2 projects. Was still stuck on the old system there for some god forsaken reason.
@IKK8888 Жыл бұрын
very helpful! Thank you!
@renisrrenis9225 Жыл бұрын
is it most efficient way to detect clicks on large amount of objects?
@cecisharp6 ай бұрын
Amazing tutorial, thanks!
@chonkgames6 ай бұрын
Thank you for the kind words! 🤗
@HaikAgdere3 ай бұрын
All of this just to detect a click?
@boltsy65253 ай бұрын
thats what im saying lol its ridiculous
@advancedgp5309 ай бұрын
bro this guy is everywhere at the same time LOL, mans mouse is teleporting and the frames cant keep up with him