How To Implement Key Rebinding | Unity Input System Tutorial

preview_player
Показать описание
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Just Here To Plug My Social Media Stuff:
-----------------------------------------------------------------------------------------------------------
If you liked the video then please respond with a like and a subscribe to show your support for the channel and I'll repay you by creating more tutorials for you to enjoy :D

0:00 - Intro
0:20 - Setup
4:35 - Coding
13:31 - Testing
14:00 - Outro
Рекомендации по теме
Комментарии
Автор

I’m trying to make a simple fps game for me and my friends to play and your series on mirror has been super helpful. You are the new brackeys since he’s taking a break

jack-eyof
Автор

oh god, thank you for this. I've been searching for a tutorial for this and they just don't exist anywhere else! You're a lifesaver!

xelioth
Автор

I was like "let's see if this guy has a tutorial for this, just in case..." and there you have it! Thank you!

ligofleyens
Автор

For those of you wondering how to rebind composites:

var bindingIndex = => x.isPartOfComposite && x.name == "Up");
rebindingOperation =
=> RebindComplete()).Start();

To change the other 3 just change "Up" to "Down" "Left" "Right".

ravcho
Автор

The mad lad finally did it! THANK YOU!

JadonBarnes
Автор

Thanks for this! I was just in the middle of researching how to do this exact thing and here you go!

GTLugo
Автор

Hey just finished your RTS udemy course. great work Just wanted to say thank you.
You don't even need the other guys, you're more than capable of doing it by yourself. Looking forward to more from you.

IntenseMX
Автор

Rebinding code is at: 6:43, everything before this is about setting up the demo project.

tonyzaddo
Автор

Integrating the assets from the RebindingUI sample in the InputSystem package hasn't worked entirely, so while this semester-long school project that I'm working on is due in less than 48 hours, better late than never. Lol, but in all seriousness, this was so helpful! Looking forward to future installments on this topic for my personal projects!

LMC_Jarred
Автор

That's got to be the best 15minutes I'll ever spend. (Unity-wise)

MasterofFire-scyn
Автор

nice! It's such hopeless how Unity is making this so hard and undocumented. They post that Knights demo but with absolutely NO comment anywhere. It's really hard to follow.

There's an issue in videogames where key rebinds wouldn't be offered thus making it unplyable for someone who doesn't use a qwerty layout so I had two questions related to that:
1 How to display the actual character on the active keyboard layout instead of the text on a qwerty layout?
2 Is there a possibility to go through the input groups and actions programmatically so a tool could be written to generate a rebind screen (like with tabs for each group - Menu, gameplay, etc) ?

Cheers! I'm going to subscribe for now! :)

ZoidbergForPresident
Автор

Nice tutorial, really good explained. just keep it up. your the next brackeys :D

fron
Автор

I really enjoyed your tutorial! You did a great job of explaining all the things you were putting in, making this very accessible.
There are three things I'm still looking for, though:
One, how do you have a "cancel" option in the key binding? So for example, if I selected the wrong input I could press "escape" and it would exit the rebinding function without assigning a new key.
Two, how can I revert controls to default? So, rebind input from code instead of specific player input.
Three, how do I efficiently handle multiple actions to bind? You said you would do a video on this, but I don't see one yet.

marscaleb
Автор

just what i needed my guy came through with the clutch thanks.

ZuloYT
Автор

Just what I was looking for Thank you mate!

DrDooma
Автор

Suggestions for another Tutorial about it:
* Rebinding in a Start Menu without Player
* Multiple Rebindings with Loops
* Multiple Controler support
* Switch Binding Image with Controler (Scriptable Object of Ps4/Keyboard/Switch etc)
:D

fron
Автор

Hey Dino. Such a great content! I would love to see more advanced input system operations.

adek
Автор

Hey ! Awesome tutorial, very helpful.

cookiewood
Автор

Thanks for the tutorial, but i have some questions left:
How do i rebind 1D Axis inputs?
How do i display the binds of the question above?
How i keep these binds through scenes? Or better, how do i save the binds to a variable i could use in my singleton?

Let me tell you, documentation on this recently 1.0 input system is awful to say the least. The thing itself is very hard to use...

Hello again, i'm also wondering: maybe its possible to playerInput/playerController entirely from your script? Or, maybe, you could, if you were to rebind in a scene that is not using any inputs? Reading and watching and testing, dont mind me...

ChicDead
Автор

I would be so lost if this project wasn't available on github, tweaking the project made learning what's going on here (vs my previous learned way of just adding InputActions directly to a script) much easier

JoeGeorge
welcome to shbcf.ru