Unity's "NEW" Input System with C# Events

Unity's "NEW" Input System with C# Events

One Wheel Studio

3 года назад

87,576 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@KBforJesusChrist
@KBforJesusChrist - 11.07.2023 11:01

I can't find the manual

Ответить
@HTMLlama
@HTMLlama - 21.06.2023 05:27

Thank you thank you thank you! I've watched hours of videos on the new system and this is the first one that made it all click.

Ответить
@gingerTRAVIS
@gingerTRAVIS - 10.06.2023 12:01

you know things are poorly documented and overly complex when even the guy doing the tutorials struggles with it, I feel like as a unity beginner I am completely fucked lol, like all I want to do is get the value of a controller input to pass in to a variable, thats it.

Ответить
@pedropc5824
@pedropc5824 - 11.05.2023 00:44

I love this channel

Ответить
@ragnar8871
@ragnar8871 - 13.04.2023 16:41

I still prefer the old one😅

Ответить
@ayanjiuye4535
@ayanjiuye4535 - 26.03.2023 17:10

there are no 2D Vector composite in Input system now

Ответить
@rungy8214
@rungy8214 - 23.03.2023 16:30

Thank our Father in Heaven for you sir!!! FINALLY someone explained the Input System the way UNITY SHOULD HAVE DONE IT!

Ответить
@HorizoneMeNol
@HorizoneMeNol - 06.03.2023 04:06

If you're following this tutorial and can't find yourself a 2d composite
please note that unity input 1.3.0 or above, has wrap up the composite creation
on Movement(green tab) select action type from "button" to> "Value" and underneath controltype to "Vector2"
now when you right click on green tab
it will show up/down/left /right composite which is the same in this video
and you will be needed unity input 1.1.0 or above for key rebinding later on

Ответить
@blaizerhodes
@blaizerhodes - 03.03.2023 10:56

If you use compiled input assets can you then rebind keys in game?

Ответить
@cathalmccosker
@cathalmccosker - 20.02.2023 17:38

Thanks for the walkthrough. I was using the C# events as regular events and was getting severe performance issues. I didn't know I had to use farmerInputActions.Disable() on OnDisable() for the new InputSystem. You don't have to do that for each event [e.g. farmerInputActions.Player.Jump.Disable()], just for the input mapping file itself [farmerInputActions.Disable()]. Great video!

Ответить
@thygrrr
@thygrrr - 06.01.2023 17:40

WHY does everbody say the new InputSystem is difficult for the simple stuff? Example for the thing mentioned at the start of the video:
if (Keyboard.current.spaceKey.wasPressedThisFrame)) { ... }

This is as simple, and clearer than:
if (Input.GetKeyDown(KeyCode.Space) { ... }
because you can treat each of the controls or devices as a stateful Input Action when you get to that point.

It works like that RIGHT out if the box, without even any action maps, player input components, or action assets, which give you great functionality on top.

Same for GamePad.current.leftStick and other axis controls. Way better than the travesty that was the old input manager.

There has been no reason to use the old InputManager for easily over 2 years now, except if you're perhaps maintaining a legacy code base on a (very) old game.

Ответить
@VEOdev
@VEOdev - 07.12.2022 14:09

Nice tutorial, but let's be honest, the only benefit of the new system is the ability to create a rebind system and save it easily and that's it.

Ответить
@AllegedlyDuke
@AllegedlyDuke - 27.11.2022 13:27

is your hair blue or is it just very fluorescent

Ответить
@ampomahwinston3878
@ampomahwinston3878 - 09.09.2022 10:11

Hey there's new update on the input system for the actions. can you please update.

Ответить
@steveradtke1308
@steveradtke1308 - 25.07.2022 19:39

I have watched 2 other guides on the new input system (I only just upgraded to it) and this is the best tutorial I have come across. Thank you.

Ответить
@jamesstephenson4544
@jamesstephenson4544 - 19.06.2022 18:23

I have tried so many different videos the last few days to get the new input player. So thanks and I will be subscribing.

Ответить
@Seiku
@Seiku - 16.05.2022 10:16

Is it normal for the debugger to show movement value (0.0, 0.0) when nothing is pressed?

Ответить
@vahdos1316
@vahdos1316 - 13.05.2022 01:45

so i followed this... and it works how you showed... but how do i actually use it? like, im getting the Debug.Log's in my console, but how to I actually use the Input system? I already have a PlayerController script but its set up with the old input system. How can i get the new input system to use the code Ive already got for my player movement, jump and other inputs

Ответить
@citan554
@citan554 - 27.04.2022 08:42

This was very concise and helpful, thank you! I've subscribed on Patreon

Ответить
@StormyDoesVR
@StormyDoesVR - 25.04.2022 21:36

Im trying to use the input system to hear if an XR controller's button is pressed and then make my player controller jump via code, but I can't figure out how to execute a void when a button is pressed. I was close using your tutorial but on the farmerInputActions.Player.Movement part, it can't find the Player.

Ответить
@KiaAzad
@KiaAzad - 22.04.2022 12:40

I've been watching videos on the new input system all morning, trying to get a cube move in four directions, everybody jumps right into the c# classes and skips over explaining how the send messages works. I know it's simply writing functions to handle those events, but I'm looking for someone to hand it over to me in a nice short tutorial instead of forcing me to figure out how to get that vector2 and feed it to my rigidbody. Would you be kind and make a quick one please? Most channels don't cater to the absolute beginners fresh from installing unity.

Ответить
@duzx4541
@duzx4541 - 22.04.2022 00:26

Cant even add the 2d Vector composite- doesnt give me the option...

Ответить
@dannybrez
@dannybrez - 12.04.2022 01:17

Upon watching your Key Rebinding I realised from this video I didn't generate my C# script, I was going crazy! I have to say though your videos are super helpful and I am 100% going to be watching more. Thank you :)

Ответить
@enso_freestyle_create
@enso_freestyle_create - 09.04.2022 16:54

So how do I get to use this with an PlayerObject and actually make it move?

Ответить
@totivasilev3666
@totivasilev3666 - 07.04.2022 22:27

Like damn... ive watched 3 tutorals and this one didnt help as well. My player doesnt want to mode using a xbox controller

Ответить
@GiggityxGamer
@GiggityxGamer - 11.03.2022 05:44

@onewheelStudio hey im trying to use the new input system for my project and all is going well except one aspect. my swipe detection does not work if im already touching the screen. How can i use the input system to recognize my swiping finger even if its the 2nd or 3rd touch on the screen at that time? Thanks

Ответить
@mazen7844
@mazen7844 - 24.02.2022 22:06

I'd like to see how to make something like a complex input like mortal kombat special moves for example (down + right + punch)

Ответить
@mayankbhaisora2699
@mayankbhaisora2699 - 23.02.2022 22:34

Just came across your channel and I love your videos. You explain everything properly. Thank you mate. 🖤

Ответить
@bigflatshady9204
@bigflatshady9204 - 18.02.2022 02:57

I was here to learn already, "I can only help you if you help yourself" didn't need that coach. On to the next one. May your viewers appreciate your attitude because I don't.

Ответить
@BlackJar72
@BlackJar72 - 16.02.2022 07:36

My experience with the new input system so far is that it caused the fans to start whirring on my 3900X while producing choppy, erratic movement that just felt lag-tastic.

Ответить
@ghostderazgriz
@ghostderazgriz - 15.02.2022 23:15

I see in this video you generated a c# class but then use it to assign values to input assets in the Player script. What would be the benefit of Enabling input actions individually like this vs. just enabling the entire Generated class? Is there a clear distinction between both cases?

Ответить
@amieldanao968
@amieldanao968 - 14.02.2022 19:33

The problem with the unity new input system is that they dont know how to make a tutorial like this. Thank you very much sir, bravo!

Ответить
@julianmjk5120
@julianmjk5120 - 08.02.2022 18:24

Unity 2020.3 can now be used with the new Input System, it was recently updated :D

Ответить
@m_maksym
@m_maksym - 08.02.2022 12:04

please make more videos about this new system. very interesting! a day ago tryed to make a in-game zoom(by changing fov when right mouse button is held and unzoom when released) but failed and in few lines made it on ols systen)

Ответить
@azyjmexcuseokstop924
@azyjmexcuseokstop924 - 27.01.2022 15:48

problem with this implementation : it doesnt use maps, and i'd like to use maps.

Ответить
@cyrus3430
@cyrus3430 - 24.01.2022 02:00

Someone please link me to the tutorial done by an Indian,this guy keeps stalling

Ответить
@ng1048
@ng1048 - 19.01.2022 14:57

Can we adapt this to Corgi Engine? Does it take a long time to do?

Ответить
@Danyu91
@Danyu91 - 03.01.2022 10:06

my input actions require context, unlike in your thumbnail where you can simply += or bind the fucntion to the event. i just copied from the different tutorials, but i dont understand why i cant just bind a function without context

Ответить
@TuZoli
@TuZoli - 29.12.2021 13:16

There's no "Add 2D Vector composite" option now. The only options are "positive/negative binding" and "binding with one modifier" and "binding with two modifiers". Currently on Input System 1.2.0 How do I proceed?

UPDATE: It seems having that option was a bug as it shouldn't be available for button actiontypes.
UPDATE 2: If you select "Value" Action Type and "2D Vector" as control type you have the "left/right/up/down Composite"

Ответить
@dogsnout
@dogsnout - 25.12.2021 07:57

You explained this perfectly. Thank you so much!

Ответить
@grandy5333
@grandy5333 - 23.12.2021 17:34

i have no clue what i did wrong, ive gone throught the code a couple of times and i see no errors, but i dont get anything in the console and unity cant find the action map Movement, even though i havent added "movement" anywhere else then in this tutorial

Ответить
@moltebergk
@moltebergk - 20.12.2021 03:13

This helped me a bit on the way. I would have found it a lot more useful if you had split the video into two parts, one for a general explanation of the input system and another where you go into more detail about subscribing to c# events. For instance, as of this point I'm still not sure how to subscribe to an action without directly subscribing to the phase through c# events.

Ответить
@mg1632
@mg1632 - 18.12.2021 23:59

Thorough walkthrough of the new input system. I stumbled upon this after fighting for 6 hours through the unity documentation which has dozens of disjointed code snippets, screenshots, and code explanations that culminates into a failure to convey any cohesive usage of their own system. HUGE Thank you for the time and effort you put into this!

Ответить
@ernestj8000
@ernestj8000 - 14.12.2021 16:13

Excellent explanation and walkthrough. Thank you for posting this.

Ответить
@TheLegendsOfTynedale
@TheLegendsOfTynedale - 13.12.2021 01:25

I would like to know how to let the player customise the controls. That they can change the shoot button from say X to Y or from Space bar to the Enter key.

Otherwise, an excellent tutorial and presentation style. Clean and concise with solid modelling.

Ответить
@isjesse1
@isjesse1 - 07.12.2021 12:12

4am, i final got i figured out, thank you sir, im going to bed

Ответить