A bug was found where when you reset an action and the binding is already set in another action, there will now be 2 actions with the same binding. I fixed it so that it swaps the values instead. Full source code available in the description. Here's the fix: RebindActionUI.cs // In the ResetToDefault function add public void ResetToDefault() { if (!ResolveActionAndBinding(out var action, out var bindingIndex)) return; /////////// ADD THIS IF STATEMENT // Check for duplicate bindings before resetting to default, and if found, swap the two controls. if (SwapResetBindings(action, bindingIndex)) { UpdateBindingDisplay(); return; } // keep the rest as normal } /// /// Check for duplicate rebindings when the binding is going to be set to default. /// /// InputAction we are resetting. /// Current index of the control we are rebinding. /// private bool SwapResetBindings(InputAction action, int bindingIndex) { // Cache a reference to the current binding. InputBinding newBinding = action.bindings[bindingIndex]; // Check all of the bindings in the current action map to make sure there are no duplicates. for (int i = 0; i < action.actionMap.bindings.Count; ++i) { InputBinding binding = action.actionMap.bindings[i]; if (binding.action == newBinding.action) { continue; } if (binding.effectivePath == newBinding.path) { Debug.Log("Duplicate binding found for reset to default: " + newBinding.effectivePath); // Swap the two actions. action.actionMap.FindAction(binding.action).ApplyBindingOverride(i, newBinding.overridePath); action.RemoveBindingOverride(bindingIndex); return true; } } return false; }
@edin.3 жыл бұрын
this is great and works if you do for example : 'Jump' = J , then change the 'up' key to 'Space' and reset the 'Jump' Button, it will swap both inputs, but it doesn't work the other way around, for example : change 'Move' to 'up', 'down', 'left', 'right' , then change 'Jump' to 'W', if you reset the 'Move' action you'll end up with 'up'='W' and 'Jump'=W. not a big deal, just wanted to point it out tho, this tutorial was amazing ty edit : I tried to fix it for a little bit, I think I found the issue, when newBinding is a composite, the 'newBinding.path' = 2DVector, instead of all the bindings (/w, /a , /s, /d), but i couldn't get it to at least say 'newBinding.path' = /w which would solve the problem easily. Hopefully someone can figure it out
@okito76673 жыл бұрын
@@edin. I've recently run into same issue and I'm not sure how to fix that, we'd need to check if either of the bindings are composites and if so then resolve that somehow, but for now I'm stuck with it
@the_mystical_pigeon2 жыл бұрын
@@okito7667 I don't know if this will work for you (assuming you haven't figured it out yet) but I have my own version that works properly with both basic and composite bindings. I also have commented code here to just reset both the requested one and the duplicate, whichever works for you. private void ResetBinding(InputAction action, int bindingIndex) { // Cache a reference to the current binding. InputBinding newBinding = action.bindings[bindingIndex]; string oldOverridePath = newBinding.overridePath; // Remove the current binding action.RemoveBindingOverride(bindingIndex); // Check all actions in the map for duplicates foreach (InputAction otherAction in action.actionMap.actions) { //Skip if this is the original action if (otherAction == action) { continue; } //Check all bindings for duplicates for(int i = 0; i < otherAction.bindings.Count; i++) { InputBinding binding = otherAction.bindings[i]; if (binding.overridePath == newBinding.path) { // Reset the binding //ResetBinding(otherAction, i); // Or swap the bindings otherAction.ApplyBindingOverride(i, oldOverridePath); } } } }
@rubpty2 жыл бұрын
@@the_mystical_pigeon Hi. From where you call this function? Thank you!
@rubpty2 жыл бұрын
Thanks for this awesome tutorial! Is there a way to just swap the bindings if finding a Duplicate?
@AlexBlackfrost3 жыл бұрын
I think rebinding is a feature that every game should have. However, there are not many tutorials about this. Thank you!
@nightmareblocks2 жыл бұрын
Honestly, setting up rebinding doesn't seem to be as difficult as I thought, so long as you now what you are doing of course. Great tutorial. Also I was NOT expecting the persistent rebinding to be that simple.
@samyam2 жыл бұрын
It was certainly difficult to figure out from the documentation! 😂
@WhoaitsJoe Жыл бұрын
I'm trying to wrap up a project I've been working on for two years, and I had to switch to a newer version of unity for one reason or another. I've been looking at a lot of tutorials on this input system after using unity 2018 and yours was the only one to help me figure out why it wasnt saving my key rebindings. Thank you for finally helping me wrap up this sisyphean nightmare, and I hope we can get more excellent tutorials on godot when I finish this project and make the switch hahah
@PlatinumCollectibles3 жыл бұрын
I usually don't write comments, but for this one I have to: By far the best tutorial I found for covering more edge-case issues such as composite bindings or duplicate keys. Really well explained and vividly moderated! Maybe, instead of jumping through the unity sample, you could have prepared an own, shorter and better named example of the rebind UI, but I guess that would not be worth the extra time. Keep up the great work, really helped us with implementation!
@PlatinumCollectibles3 жыл бұрын
also, checking duplicate keybindings in OnComplete can become a problem if you live update the UI e.g. on device switch, because the (invalid) key has already been changed and this invokes OnControlsChanged, which in return would refresh the UI too early there are callbacks that fit better here, such as OnPotentialMatch or OnGeneratePath
@samyam3 жыл бұрын
Thanks so much!! Glad you enjoyed the video and thanks for the tip!
@noodles4s892 Жыл бұрын
Thank you so much for taking your time to make this. It is very helpful and i hope you are doing great!
@samyam Жыл бұрын
Thank you!
@InterloopStudios2 жыл бұрын
I'm having a problem where my WASD binding isn't getting overridden letting me move using different keys. Buttons that are not composite aren't having this problem. Help?
@Bruce.B3 жыл бұрын
Thank you. This is great. I think rebinding is essential in a decent project. I was looking forward to see your tutorial for this. And your method is very intuitive as usual.
@jonathanjblair3 жыл бұрын
Glad to see another tutorial from you. I was worried you had gone the way of Brackeys.
@samyam3 жыл бұрын
Busy times 🙃
@okonkwo2892 жыл бұрын
How do I swap keys during rebind operation?
@felix_55012 Жыл бұрын
it works for me in part: as soon as I open my menu and change the jump key the text changes saying the key I've chosen but as soon as I try it doesn't jump with the new key but with the old one.
@cosmemartinez1443 жыл бұрын
I'm from México and I'm starting to make my games and I just love your videos, your voice is so sweet and makes me concentrate very well and you make look so easy everything you do. Thank you for all your videos, really really thank you
@RickyYhC2 жыл бұрын
Your videos about the input system are pretty nice. :D
@HadiExtreme3 жыл бұрын
Your videos on the new input system are great and very informative, thank you!
@samyam3 жыл бұрын
Thanks!! 😄
@c0gnus3 жыл бұрын
Dziękujemy.
@samyam3 жыл бұрын
Thank you so much for your donation!! It is very much appreciated :)
@ДаниилГригулевич11 ай бұрын
Hi. If I change the controls. It is applied only when restarting the editor or the game. What could be the mistake?
@imDanoush Жыл бұрын
What a magenificent, to-the-point, and clear tutorial. Thanks! :)
@aces_games2 жыл бұрын
Great video and very detailed explanation! One thing though. Is it really impossible to use TMPRO instead of the old school TEXT, because I only use TMPRO in every project of mine. I did try to replace all the old TEXT fields within the Rebind script, but it wont find any TMPRO references…and you mentioned something about a namespace issue. So, I’m askin you if you would know something about solving this issue, because I kinda refuse to go back using the old text?
@aces_games2 жыл бұрын
I’ve solved this myself. The TMPRO namespace needs a reference to the Rebind script. There’s an assembly file along with the Rebind scripts. It’s a jigsaw looking icon called “Unity.InputSystem.RebindingUI”. In there under “Assembly Definition References” you need to add the TextMeshPro reference. Remember to hit apply.
@roganm2672 жыл бұрын
@@aces_games Many thanks
@glenzhang36462 жыл бұрын
It is always worth it digging into the comments, thanks man
@baguette1014 Жыл бұрын
Amazing video!! Probably the only one that has helped.
@tommywilkinson33 Жыл бұрын
Edit: Nevermind.. apparently closing and restarting the editor suddenly made it work now. Thank you! I'm not sure if Unity changed something since this video was published but unfortunately this doesn't work anymore :/ The rebinding process seems to work and even changes the text to show the new button you press, but it still uses the original controls and ignores the actual changes made with rebinding. I've been working on this system for months and cannot get Unity's rebinding system to actually work properly.
@JenkedAtBirth Жыл бұрын
i have this same issue but restarting didn't work
@ugurtunakoca35842 жыл бұрын
Thank you, I implemented rebinding to my game with your tutorial. This is a very best tutorial, you explained pretty much everything about rebinding inputs.
@samyam2 жыл бұрын
Thanks!!
@universegames76926 ай бұрын
Your tutorials is awesome, but I have one question. Why we sometimes use bindingID and actionReference when we can just use bindingIndex of action and action?
@DiegoVieira Жыл бұрын
Thank you, I just implemented this in my game! You were a life (and time) saver!
@samyam Жыл бұрын
😁
@marscaleb2 жыл бұрын
29:50 Okay, but can I instead have a duplicate binding just remove the other binding? If I'm setting a button to a specific command, I don't want to hunt down the old button and reassign it first, I want to make that specific button use that command. Ideally I would want this to be paired with a warning message when I try to leave the controls menu to tell me that a given command isn't set, so a function to check for un-bound controls would be good too.
@luciatorrusio29992 жыл бұрын
If you are using PHOTON 2 PUN, then change the active input handling to "Both", I was a while trying to add photon
@scorpion666lair3 жыл бұрын
Once again, +1 on the awesome Input System! Thankyou so much for promoting it :) Great work!
@samyam3 жыл бұрын
Thank you!
@petervitale4431 Жыл бұрын
Now what happens if you want to add modifiers to a Composite Key? I want to use the Vector3 Composites with a modifier (LShift) for the Up/Down functions. There is no way to do this with the new system that I'm aware of.
@thefrenchdev9653 жыл бұрын
Thanks for the tutorial. Especially for showing me the script they have made in the preview versions because I was struggling so much with the composite rebinding... It is still not perfect but at least it does the job.
@Swissdiv Жыл бұрын
Anyone else has the problem after restarting the Scene/Application, the bindings do not get displayed correctly? The text shows always the default values, but the bindings get safed/loaded correctly. For example: I use ESC to open/close PauseMenu. I rebind that action to the key "I". Restart the scene & the binding shows "Esc" instead of "I", but i need to press "I" to open/close the pause menu. When I press on it to give a new input and then cancel it with "Esc", the correct binding gets displayed. In this example "I"
@gamedevdoggie84133 жыл бұрын
One thing that tripped me up a bit was that I did not install the preview version of the Unity Input package. Doing this through the UI proved to be difficult so I manually edited the manifest.json file to include the package that was mentioned near the start of the video "com.unity.inputsystem": "1.1.0-preview.3". The LoadBindingOverridesFromJson() does not exist without it.
@FireHawkX3 жыл бұрын
EDIT : I finally managed to get 1.1.1 version for this past september!! and it has the saveload and the overrides! :) so i'm all good!! OLD MESSAGE : How did you managed to do it? I already have the 1.0.2 (latest) version installed... i edited the manifest and put "1.1.0-preview.3"... but now when i open the manager in unity, i get asked to "update" to 1.0.2?... do i need to remove it first and then re-add it? i already did a backup of RebindActionUI so I dont lose the changes we did... but I dont want to lose my actionsmap and all the other settings... thank you for your time :)
@coloneljcd60412 жыл бұрын
There is an OnApplyBinding callback that lets you validate input before its applied, instead of doing it after complete.
@piemonstereater2 жыл бұрын
If you are like me and you don't want to have all your move key bindings attached to one rebind button, add the following code to check duplicate bindings: for (int i = 0; i < action.bindings.Count; i++) { InputBinding binding = action.bindings[i]; Debug.Log("BEP: " + binding.effectivePath + " NBEF: " + newBinding.effectivePath + " i: " + i + " binding index: " + bindingIndex); if (i == bindingIndex) { //Debug.Log("Continuing past: BEP: " + binding.effectivePath + " NBEF: " + newBinding.effectivePath + " i: " + i + " binding index: " + bindingIndex); continue; } if (binding.effectivePath == newBinding.effectivePath) { Debug.Log("Duplicate binding found! " + newBinding.effectivePath); return true; } } I put it above her foreach loop, I am not sure if it matters where in the method you put it as long as its below InputBinding newBinding = action.bindings[bindingIndex], but I know that it works in that spot so thats why I recommend you put it there.
@jeffersonrodrigues7570 Жыл бұрын
nice, thanks
@wolderado4 ай бұрын
This was very useful! Thanks a lot!
@marscaleb2 жыл бұрын
21:55 is there a way to get it to exclude an entire input method? For example, ignore everything mouse and keyboard, or alternatively ignore everything gamepad? After running some tests, I think I want to separate these, or else assigning new controls is going to get messy...
@theblock9221 Жыл бұрын
It's an amazing tutorial but I got to ask if I use the player manger and Create 2 players whouldnt change the controls for both?
@gabrielplourde6791 Жыл бұрын
How would you handle rebinding different maps of your input actions? IE I have a player map, a UI map, etc, that each handle different sorts of inputs. This code only supports one map, since we have to use the PlayerInput component.
@ryanke6695 Жыл бұрын
Your video is super helpful! Thanks a lot!
@paypercutts3 жыл бұрын
Thanks for this Sam. I'll keep this in mind for my game later down the track
@StudioSlam2 жыл бұрын
Those sample scripts are pretty long! Using the input package I wrote my own player input component rather than using the component that came with the package and I took some time looking through the sample rebinding scripts. Do you know what references I would have to change to make these rebinding scripts work?
@rokeyabegum1392 жыл бұрын
Hey wanted to ask something ... working on a project ... my canvas buttons don't work if I have my unity starter asset player armature active in the scene and thus i can't work on my pause menu ... I am using the new input system ... can u help ?
@TodosLocosOfficial Жыл бұрын
I don't think the Rebindable UI folder was imported into my project. Is there anywhere I could download it from?
@asztrik3 жыл бұрын
Yes, thank you! Been looking forward to this one.
@leLawain2 жыл бұрын
I have a strange behaviour: If I rebind ONE BUTTON and Reset it, the script works like a charme. But if I try to rebind and reset AN AXIS the rebind aspect works but not the reset. Does anyone know why? or has the same problem? I get the two error massages: 1. Duplicate binding found for reset to default: 1DAxis. 2. ArgumentException: Binding path cannot be null.
@a.technology14463 жыл бұрын
U r the best one Explaining the input systems ❤️
@Jaypordy3 жыл бұрын
Invaluable tutorial. Thank you Sam.
@madalinadobre60623 жыл бұрын
Very nice tutorial, followed it all but in the end the keys arent rebinded... the UI shows the new bind but the game works wit old controls
@samyam3 жыл бұрын
Try setting a breakpoint in the StartInteractiveRebind function and step through to see if someone is going wrong throughout the process. Also make sure the sample rebind scene works out of the box
@margaritagosman11083 жыл бұрын
Hey, i had the same problem. Check if you are using playerinput like she did in the beginning of the video in the code and the running the methods for the buttons with if(playerinput.actions["Nameofaction"].pressed instead of calling the actionmap
@aces_games2 жыл бұрын
I'm having the same issue. The rebinds only work when I restart the game in the editor. Did you find a solution?
@keshorr54763 жыл бұрын
If you split up composite on individual buttons that you want to be remapped, the code does not work. Within same composite you can bind same buttons for up, down, left, right and it will let you. It will only catch duplicate if it is outside the composite.
@samyam3 жыл бұрын
In that case you'd have to go through each composite's individual bindings within that map and check if it is already bound.
@keshorr54763 жыл бұрын
@@samyam i have fixed it already but just noted so others know :) There are several other smaller issues, for example if you use controller or both devices. In general your videos are very informative and well put together.
@samyam3 жыл бұрын
Thank you :)
@piemonstereater2 жыл бұрын
@@ThePro-ng4yt Did you ever manage to fix it?
@piemonstereater2 жыл бұрын
@@ThePro-ng4yt Nevermind, I found my own workaround
@NevaranUniverse3 жыл бұрын
Any way to check if the key is already assigned to something in the `PerformInteractiveRebinding` , with some exceptions? Like allow a `pick up` and `interact` action to share the same keys, but not `pick up` and `walk forward`, for example
@samyam3 жыл бұрын
You can have a list of the action names that you want to share bindings between and check if the action.name matches that and filter it that way, you'll probably have to implement that manually though (alter the duplicate bindings script).
@charliep6492 жыл бұрын
I have two control maps for a two players game, after following this video everything works, except remapping P2 control just add a new duplicate for P1 controls. All the actions in the remapping prefabs are set correctly.
@FireHawkX3 жыл бұрын
2 Things, First, as of today (october 18 2021) - (latest public version of input system 1.1.1) there is a bug in the player input that it will not "readvalue" from any FixedUpdate()... so if anyone is having this issue using an old(er) version, that is why :) Also, I am not sure if anyone will be able to help out, I followed this guide to the letter, and somehow the rebinds I set are not working until I completely restart the application... they are saved properly and reloaded properly, but the input system will uses the keys loaded from launch until the game is re-launched... is there a public method somewhere that I can call after saving the new keys to force a "reload" or something? :) Again, Thanks for your time (or anyone else reading) :)
@fokozuynen20482 жыл бұрын
What if someone want to change only the W key and not all the rest. I need to go and set all 4 keys each time?
@whiteshadow38412 жыл бұрын
Nice tutorial, do you have one for mouse sensitivity?
@ChazzBurger2 жыл бұрын
This is a great tutorial and just a series of tutorials in general about this input system! I have one issue with rebinding the keys though that I cannot find a solution to. When I rebind a key with my button, it will change the buttons text, as if it has changed the input, but the inputs used for moving are still the old ones. Sorry to ask a year after the video upload but I cant find a solution anywhere and hope you have found one. Also, when I use the sample Input Action(RebindUiSampleActions) it works fine, and when I use the Input Action I made, it doesn't work. I cant find any differences between the two except the action map name is different. Thank you!
@ChazzBurger2 жыл бұрын
alright i figured it out i was using multiple Player Input components in my scene and it made the first one consistent but the other 2 clones of the input action so i just referenced a main component on the 2 other objects and all works fine
@leLawain2 жыл бұрын
@@ChazzBurger Have the same problem. How do you referenced the main component? Seems like a dumb question but i dont get it. I can use playerInput = GetComponent(). I will get a error message. If you could show me how you handled it, that would be awesome!
@ChazzBurger2 жыл бұрын
@@leLawain So what I have is a object that holds the original PlayerInput component (This can be any object you like) In my player script, instead of creating a PlayerInput component for my player, I made my PlayerInput variable to be assigned in the inspector. With this you can drag the object that has the original component onto this slot on the inspector and all should work like a charm :)
@leLawain2 жыл бұрын
@@ChazzBurger First thanks for the answer! If it isn't too much to ask, but could you maybe give me the line of code? Because i.e. "public PlayerInput _input" doesn't show up in the Inspector therefore I Can't assigned anything. And the "GetComponent()" or other things don't work either.
@ChazzBurger2 жыл бұрын
@@leLawain What I have is [SerializeField] PlayerInput playerInput; What [SerializeField] does (as far as i know) it allows any variable to bee seen in the inspector (private or not) Just a suggestion as well, instead of using public on your variables, use [SerializeField] and keep them private since public always allows other scripts to access them Well hope I could help 😁
@infernumex3 жыл бұрын
I'm trying to adapt this to work with the player controller you showed in the tilemap grid movement video, but having some trouble. Would you mind showing how you'd adapt the Move function from that controller to work with this system (or anything else that needs to be changed)?
@samyam3 жыл бұрын
Hm what kind of trouble are you having? The code for the movement shouldn't need to change, this will just rebind the keys for movement.
@infernumex3 жыл бұрын
@@samyam In this video at around 4:40 you show how you're reading input from the action mappings to use in the player controller. Would the player controller from the grid movement tutorial not need to do something similar? Since in that video everything is read in from PlayerMovement instead of from the PlayerInput you use in this video. When I tried to simply use this video as-is for that grid-based project, I was getting weird behaviour when rebinding, like some keys working after being bound but others not working. So I assumed it was because I wasn't reading in from PlayerInput properly.
@QuickTs2 жыл бұрын
Thanks alot for this time saver.
@paulmozet22443 жыл бұрын
Thanks a lot for this tutorial, really helps a lot!
@flo10582 жыл бұрын
What extension do you use for your VScode colors ? it look nice.
@samyam2 жыл бұрын
Godot extension 😆
@juli12345istRecorsi3 жыл бұрын
Great tutorial! What keyboard do you have? It sounds really nice
@samyam3 жыл бұрын
Thanks! Logitech g815 blue clicky :)
@郭一波-y3g2 жыл бұрын
Awesome!Thank you very much!
@Kitadashi3 жыл бұрын
All I can say is: You. Are. Amazing! 🍀
@samyam3 жыл бұрын
Thank you! 😄
@rainey06au3 жыл бұрын
Does this method support axis binding and detected controllers or just keys?
@samyam3 жыл бұрын
Yes it should work with any sort of composite :)
@mendalosindiedevrpg80842 жыл бұрын
Thank you so much! I didnt know about this and if it wasnt for this video I would have probably taken a week instead of a day to get my rebinding going. Btw in the editor I cant change the keybinds on runtime but in the build version it works perfectly. Any ideas why?
@kutaybarcin83043 жыл бұрын
I've come to realize that whenever I change the scene, I have to load the key binds from playerprefs. It is just a few lines of code, but feels strange to tell unity that these are my key bindings on every new scene. Have you managed to find a way to make the changes across all the scenes with a single calling?
@ZiberianDev3 жыл бұрын
Hello, how do you do this?
@Sanchez92412 жыл бұрын
thanks for this tutorial. not only its very helpful and author has a very lovely voice. but i have some issues after copying script from screen. if binding already set to some action that player hasnt changed u can assign that key to other binding.this will result same key to several bindings.and i cant get rebinding cancel with escape button cause instead of canceling rebind loogic just put esc as button to action that i tried to cancel. i am sad because unity doesnt implement many simple features that should be in release of package, like disabling and enabling input for rebind or scroll scrollview with gamepad to content when this function is implemented only with mouse input
@tahafurkan28363 жыл бұрын
I'm not sure how important but you should use width and height to scale a Unity text and adjust size with bigger font size. Also use both horizontal and vertical overflow types as "overflow". That makes it sharper. Also nice work, would love to see more.
@samyam3 жыл бұрын
Thanks! I’ll keep it in mind :)
@traz40383 жыл бұрын
You should use Text Mesh Pro instead of just normal text. Its whole lot better and sharper. Also more efficent performance wise.
@traz40383 жыл бұрын
Maybe with a little adjustment, it will work with input system with no problem since TMP contains same and other components with unity text
@samyam3 жыл бұрын
Yeah I wasn't able to import it to the class, but someone found a workaround which I've just pinned to the top of the comments, which involves setting allowUnsafeCode to true, importing the class, then setting it back to false. Thanks!
@bsauce15722 жыл бұрын
@@samyam Was this comment removed? I'm also having problems replacing the Text components with TMP. Would really appreaciate any help with this!
@canuniverse3367 Жыл бұрын
@@samyam A simple way to fix these issues is just to check if there is a assembly definition file that you can add the tmpro from the inspector.
@seyma1282 Жыл бұрын
Thank you
@aquilaarchviz69683 жыл бұрын
Thank you for this Awesome Tut,do U ever Used Gyroscope, Accelerometer or Any Senssor with New Input System Trying To Make It Work For A While Now But not Luck! if u Can help!
@samyam3 жыл бұрын
I haven’t use it yet but here is the documentation if you are interested: docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Sensors.html
@lethaldosegame Жыл бұрын
thanks for the help 👍
@vick35542 жыл бұрын
So the movement will work for 1st person too
@samyam2 жыл бұрын
Yes, this just rebinds the keys
@sanusdommedager80543 жыл бұрын
You're a lifesaver.
@milankiele23043 жыл бұрын
Good Tutorial =)
@samyam3 жыл бұрын
Thank you!
@tcbsuperhoop89 Жыл бұрын
Hi Great tutorial. Whenever I rebind with the arrow key, I get num 8, num 2, num 4 and num 8, not up, down, left, right. Please help
@PatrykDudka Жыл бұрын
If you try to bind keys in any game, you will notice that they can name arrow keys in different way, when other keys are named in every game generally same. When you also try to bind any action in any game to Numpad keys, you will notice that they are called something like, Up,Down,Right exactly like you want to achieve . So in general arrow keys and numpad keys are same, and this is their offical name, and every game just rename it how they want. You have to open script and manually check, if one of this 4 keys are binded, and rename text to what you want, if(text == "num8") text = "Arrow Left";
@tcbsuperhoop89 Жыл бұрын
@Patryk Dudka Thank you. Yeah this is what I did in the end. It just means if someone actually wants to bind to Num 2 it'll say down. It's frustrating but thanks for your help.
@rem8703 Жыл бұрын
Thank u! :)
@hungryporpoise59402 жыл бұрын
oh my god thank you so much
@mist3rs Жыл бұрын
I LOVE YOU
@kiran95333 жыл бұрын
Thank u :)
@animation74873 жыл бұрын
how can i use vs code for coding pls reply
@samyam3 жыл бұрын
I have a video for that here kzbin.info/www/bejne/aoi6iWWVqb-oa7M
@animation74873 жыл бұрын
Thanks
@GameDevDave3 жыл бұрын
2nd lol posted in Unity 3D Game Developers fb group
@samyam3 жыл бұрын
Thanks!
@RedaHaskouri3 жыл бұрын
hi honey , your tutorials soo good . i switch from BOLT visual scripting to C# .. so could you help me with tutorials to create a 2D puzzle game like LIMBO ..??
@samyam3 жыл бұрын
I don't have an exact video for something like that but my beginner playlist for a 2D game might help kzbin.info/aero/PLKUARkaoYQT178f_Y3wcSIFiViW8vixL4
@RedaHaskouri3 жыл бұрын
@@samyam good playlst dear, already i watched this . but if you can do some videos about those things.. if you can😪
@samyam3 жыл бұрын
I got a lot of stuff I want to cover, maybe one day!
why new input system with 5 years old ui lol... ui elements exist since 2019 so no excuse ...
@skymound14633 жыл бұрын
How is it possible to find everything I need on just one youtube channel ?! +1 subscriber and +55 likes really soon ;)
@guidoferrerkemp32252 жыл бұрын
I think it is a mistake to just throw in Unity's rebind script, It's confusing and the aim of the video should be to break down the problem for people starting out with this input system to build their own rebind system
@ace100hyper3 Жыл бұрын
This code is abysmal. Please stop...
@FirstGearGames2 жыл бұрын
I'm never a fan of string based look-ups, they always feel problematic. I haven't found a way to use typed look-ups yet for excluding controls but I've found a way to make them less error prone. Here's how I accomplished the same thing. Mouse currentMouse = Mouse.current; string buttonText = "Button:/"; _rebinder = _inputAction.PerformInteractiveRebinding(_bindingIndex) .WithControlsExcluding(currentMouse.press.ToString().Replace(buttonText, string.Empty)) .WithControlsExcluding(currentMouse.leftButton.ToString().Replace(buttonText, string.Empty)) .WithControlsExcluding(currentMouse.rightButton.ToString().Replace(buttonText, string.Empty)) .WithControlsExcluding(currentMouse.middleButton.ToString().Replace(buttonText, string.Empty)) .WithControlsExcluding(currentMouse.backButton.ToString().Replace(buttonText, string.Empty)) .WithControlsExcluding(currentMouse.forwardButton.ToString().Replace(buttonText, string.Empty)) .OnComplete(FinishBinding).Start();
@samyam2 жыл бұрын
Thanks for your input! Yeah not a fan of string based look up either, too many places where it could go wrong!
@NaelGITS2 жыл бұрын
You can reference TextMeshPro, you need to add Unity.TextMeshPro to the Unity.InputSystem asmdef that is on the screen when she talks about it. i.imgur.com/AFZ2b0I.png