Input System: Workflow tips and feature integrations | Unite Now 2020
Вставка
- Опубліковано 25 лис 2020
- Andy Touch, from our Technical Marketing team, shows you how to solve common scenarios when developing a cross-platform game that uses the new Input System. Learn how to quickly switch control schemes, rebind control settings, and connect the Input System with other Unity features.
Speaker:
Andy Touch - Senior Global Content Developer (Unity)
👉 Check out the Input System page for more learning resources and sample projects: on.unity.com/3nrhYdY
📖 Learn more about updated tutorials and our sample project Warriors: on.unity.com/39iysBm
📺 Dive into Unite Now year-round to join us for live sessions or watch sessions on-demand: on.unity.com/3lHuNAm
📝 Did you find this video useful? Room for improvement? Complete this survey to let us know: on.unity.com/2UDfsF6 - Ігри
An input video by a person named Touch. Nice.
My parents planned this video 3 decades ago. ;)
I guess you could say its a nice touch
This was touching
So he seems to be in touch :)
when the glove fits the hand perfectly
25:07 Runtime Rebinding
Thank you for your Work !
thanks!
Nice, glad to see Unity making a lot of great videos. I make a lot of tutorials on the new input system for anyone interested in learning more 🙂
you can make 1000 videos with this info but having something unique is rare.
This is definitely a great GREAT video on a sorely-needed solution in Unity. Great job, Andy! :)
Great stuff Andy, really useful ! I'm planning to replace Incontrol in my project with this, the UI event component seems so useful!
Let me know how it goes! :)
This channel has helped me a lot
Thanks for the tip on the cinemachine input provider! Great work!
Is there is any way to secure our assets from extracting using common ripping tools like uTineyRipper, asset bundle extractor. We spent months maybe years to make something so we need solid protection for our works,
Sorry for my bad english
This is what I need it...
Though it sounds so easy in this video I gave up trying to get the UI to work over the Player controls and switched to using the Old and New both as the code in the Warrior project was so confusing going back and forth over many scripts! By the loud silence to most of the questions, it is apparent that even Unity doesn't have answers to the multitude of questions below! If there is anyone who has actually done this, please share your knowledge.
Awsome. Thank you!
Great presentation. Will check out that branch now.
Great tutorial, very interesting thank you.
Well explained 👍
Amazing!
I love your videos
Hi! We tried to setup a USB Controller (HID) and tried the "listen" button in the Binding part. It's working fine in the Unity Editor but did not work when we created a build and installed it in android. Do you have an idea why? Did we miss some setup or what? Thanks!
Hey Andy. If I assign the same input value (ie buttonSouth) to another Action Map an then query it using :
int controlBindingIndex = focusedInputAction.GetBindingIndexForControl(focusedInputAction.controls[0]);
it returns -1 which leads to errors.
Hi great tutorial thanks for the demo! I downloaded the project from github and trying to add the touchscreen functionality within this project but I can not make it work do you have a video or guide explaining more in details how to make the touchscreen works easily or this is a feature to be implemented, I can see the UI sprites and all but I thought that for example like the joystick when on mobile if I thouch the screen the player input would automatically switch to device name : Touchscreen.
Currently I have two characters in my Fighting game, Player 1 and Player 2Both are using the same scripts. And player inputs. Without doing any further setup the new input system works. Both characters are in the scene and work without instantiating them via the PlayerInputManager.
If move the first gamepad it takes control of a player. If I move the other controller it controls the other player.
Everything is working up until this point.
NOW how do I set it up that the person who selected with his controller the Player 1 in the menu takes control of the Player1 in game. And the same for Player 2.
is it possible to have multiple independent inputs for UI? for example a character selection screen where every player selects a character?
after 72 hours with this... after "building WebGL", the Y-axis of a Xbox One stick fails. It doesn't fail in Unity, nor in standard build. Gotta love it.
Hi Andy, The Editor did not accept my request to furnish your scene automatically with an XR Rig, citing "Main Camera is not in the root of the hierarchy." So, I went ahead and added the Rig and VR camera manually. Everything works fine. But should I be concerned that now there are sort of 2 cameras doing the main rendering? I can't delete your legacy camera because then the game would not respond to inputs. Thanks!
Very useful and clear presentation. Thanks.
Thank you for your kind words :)
How does the InputSystem tie into UIElements? Is there a video/article showing this or talking about this?
Can you make a tutorial on how to add to this system please? Thanks!
Still curious how this is implemented with VR? Does it tie in with the XR toolkit then?
Ill be honest; im not savvy with XR platforms, tools and inputs so decided to not cover that topic (I only present features that I am familiar with). Ill investigate for some more info and will get back to you when I can. :)
Not familiar with the XR tool kit, but the SteamVR plugin for OpenVR devices does something extremely similar. I don't think it's integrated into the new Input System but still follows the same principles. Having an action set for "Walking" , "Driving" "Menu" and so on. And then in each of those action sets you create the actions and the type of information they represent (boolean, vector1, vector 2...). So again, not sure if this works with the Input System yet, but in terms of design, it's almost identical.
It's a very versatile system and allows almost any hardware to be correctly mapped to the action. I'm working on a VR project with Virtual controllers using Keyboard input and Unity recognized the input right away thanks to the system.
But it doesnt support sensitivity and gravity of axis input like Horizontal and Vertical on the old input did... When is the processors for that coming?
I have a question for 1 scenario, what if On my ps4 controller I go ahead and try to change the attack bind, then press on my keyboard, how would I make it not put it on a keyboard bind?
ETA on the warriors repo JSON update?
When nswitch pro controller connected, charactar start run forward and attack in same time without any actions from player
😍😍😍
Is there a way of letting the player customise their buttons on the keypad? As in the player can choose to have [Space] attack or change it to have [a] as attack.
Rebinding is covered in the video.
The new system is great. But you should fix compatibility with Steam API.
It is a shame in 2020 that Unity has no native Steam integration
I wonder how it compares with other packages like incontrol or rewire interms of ease of setting up and supported devices.
Ill be honest; i've never used those other input tools so can't make a balanced and unbiased evaluation/comparison! Im sure someone else will make that study though. Would be curious to read those results!
@@donovanorhan6556 thanks for the info, good to know :)
at 24:30 how can I make it so that the camera just follows the player without the zooming and the orbiting? Currently, there are only 2 options: stationary and follow and orbit. I just want follow like a 3rd person controller with the camera just over and behind the back of the player?????
make aim follow target
how i update my game in google play and the player no need download the game again?
If in the change of controls I select a key that is already assigned to another action, what would happen?
By the way, great video. Very interesting and explanatory. In this way, the input control work is facilitated
Then you would have both of those bindings trigger the same Input Action event. :D You would probably need to add some extra code that blocks this from happening.
@@andytouch9482
that's what i was thinking
Should I switch to this or just keep flipping my movement script and vehicle script every time?
@@bezoro2008 But the new doesnt have sensitivity and gravity on axis and buttons... So you implement your own? I find that not worth switching to new system when I have to implement these not so trivial features.
Deeply worries me, because this system, years and years in the making, is beautiful on the theory, but I'm not so sure about on-the-field. The UI is great, but... I'm very tempted to keep up with InControl.
As with every new feature Unity introduces, I'm wary as well. They seem to half-ass all new additions to the engine, while also abandoning the old alternatives.
@@sebas1111_ I've been talking with some friends on the matter, and got faith to keep working with new input, with interesting results. So... new input looks good, but lacks a straightforward way of presenting itself...
Been following new Input System for years now, but finally got the chance to use it in a project (VR class project). It is downright game-changing, and I don't use that term lightly. Essentially it takes one entire component of porting and streamlines/trivializes it, while allowing for far greater compartmentalization and extensibility.
I'm only familiar with InControl by reputation, but even a solid go-to asset is always going to be a separate dependency, and thus carries some long-term risk. Totally up to you and your project as to whether that's an acceptable risk/reward, but I'm definitely looking at converting my in-development projects to the new system.
how to work with predefine players, not just 1 prefab?
Nice. I'm guessing the player input code can't handle two players using the same touch screen by default? For splitscreen ipad local multiplayer.
For something like two joysticks; one for Player 1 and one for Player 2? You might have to process the joystick input to different player inputs... ill add it to my to-do list for future updates and a blogposts. 😁
@@andytouch9482 yeah similar, but more like 2 players on the SAME physical control. Think of a single iPad with two players with their own on screen controls mainly. Pretty niche application so I am expecting I won't be able to use the automatic player script, which is ok :)
Nice video, though there was no touch input example
Official unity tutorials are always like: Here's how to do the thing you want! Step 1: Runtime Rebinding, Step 2: Bup Bup Bup, Step 3: See how awesome this is! It's that bup, bup, bup, that I need. Now I just know it can be done, but still don't know the way to implement the code. ugh.
same, he's like "just use this method!"... okay but where, how, and how does it know that you're changing Attack?
@@munce6756 It's a shame because all of these built-in helper components are completely unnecessary. I was able to start using the new input manager using just a few lines of code. It's insanely simple if you ignore all these weird helper components, oddly simpler than using the components.
For some reason they build these tutorials as if you're never going to touch code. Like, we're all here to make games, most of us are probably going to touch a lot of code.
To be fair, this isn't a tutorial, it's just a tips and workflow walk through. That said, the really should have an in-depth tutorial about this
Awesome. What is the link to the most latest version? is it V2?
I think he said the latest is main but for the exact version he used here it's V2.
I am bit confused of how this warrior example that you provided is working. in the example you can only change the text button but no other controlls, also for the menu canvas to apear is no option but have to do it from inspector . You show how a input can be keybind but not how to do it. I don't know why but making a Menu settings where i am able to remap the keys is more easy with the old system than with the new one even if i need to write extra scripts or at least this is the conclusion i reach until now.
Does this new input system support haptic feedback and such unlike the existing static Input class? If it doesn't then it's going to be mostly useless from a programmer's perspective because these things aren't that hard to implement. Haptic feedback etc. require OS level knowledge to implement. This is mainly where the engine is supposed to help out.
Haptic feedback should really be separated from input. The only thing they share in common are, sometimes, they're on the same device; otherwise, they're entirely unrelated. There's really a lot of opportunity in the VR-spectrum of technologies for more interesting applications of haptic feedback that aren't just low-frequency audio devices (tactile transducers), too.
25:56 I WISH that were true for PC! >:<
31:00 Shouldn't those be in the input action actions? Also anyway to go through the input actions to create tabs for the different control schemes and each binding within them to create your rebind screen? (Also, how to save/load a changed control scheme to be available next time you launch the game?) Also changing the xbox schem control with other bindings will change the control on any other XBox pad used by another player, right? Also, any premade rebind screen made available by Unity? Because I remember it was possible to rebind controls (if the devs weren't dumb enough to hardcode them that is) in the Unity launcher, which... have been discontinued... which is like the dumbest idea ever related to controls.
Hey Andy, since you actually read the comments and you are the 2D tool person, I need your help on something.
In 2D animation you use sprites to animate. Imagine a character with an idle animation and a run animation.
You can change the run animation as you please, you can even change color or shape of the character. Its just a matter of drawing the frames. Imagine the viking in the video in idle with red cloths and running with yellow. Its easy to do.
How do I achieve that in 3D without bones animation?. How can I have the viking in your video in idle and then when in attack animation, the sword is bigger?. Is there a thing like 3D frames?. I think games use different meshes and they change quickly between the different meshes to achieve that but is there a better way?. A morph thing?.
I hope you can help me and if you think this would make a nice tutorial, thanks in advance.
One somewhat expensive technique is to send a vertex offset buffer to the shader.
@@harshmudhar96 I just watch a video about blend shapes. It kinda works but there should be an easier way. What happens if I have the viking idle state animation and the attack state animation is another mesh and I link them both, will Unity crash?. I must try it.
Thanks.
Hey!
3D animation without bones is quite difficult and complex. And you will run into all kinds of issues with animation blending and conrol. Id recommend just using the 3D bone-based workflow. :)
@@andytouch9482 Thanks. Now you have an idea for your next tool. A tool to make 3d animations like in 2d. We make the animations in our 3d modeling app with bones and different meshes and in unity, you drag and drop and use the blend tree to animate. Easy. :)
@@pnvgordinho Off the top of my head; you can already do this with the Animation Window in swapping out meshes at specific keyframes.
4th! Wow, never been this early on a video by accident ever
hello unity i want to ask you if you can add arabic subtitles to you videos it will really help us arabs and if u dont have time or cant or any reason i hope you change some permissions to allow us add subtitles yo the video and thanks😘😘hope best for u Unity and protection of covid and thanks for all work doing
I claim -1st and 1st views. ;)
Confirmed
105th and 4th comment
And 3 comments
eweguewee
105th
807th
🤣🤣🤣🤣🤣 I'm crazy for trying to make a 3d game using core2duo and 225mb Intel integrated gpu and 4gb ddr2
104th lol
Just after you
wow , its broken again
Always remember to repent of your sins (sin is transgression of YAHUAH’S LAW: Genesis, Exodus, Leviticus, Numbers, & Deuteronomy) And Have Belief On YAHUSHA HAMASHYACH. HE Died and Rose Again On The Third Day So that you can be forgiven of your sins!
HE Loves you! Come to HIM!🙂
The third day after what exactly? -- A hangover? A binge-watch of some Netflix shows?
Also, I don't know about the rest, but Numbers can be good sometimes. Large ones. You know -- to pay for that fancy Evangelical church I want to build.
Oh -- and about that dying for my sins thing...
After I build _my_ church, I think it's gonna take A LOT more than just one death to atone for all of _my_ sins. Sorry. Pointless deaths are really not my thing, but I really didn't ask anyone to die. In fact, it would be much better for me if he came back to life. That would make me feel better about his dying. I mean... Can't he come back to life? -- Like, why doesn't he?
It really seems like he should be able to do _something_ about dying, if he indeed came back the first time and it was such a tragedy he died to begin with. I mean, why "off" yourself if you don't have to? -- Or if you did have to (for sins or whatevs), why not bring yourself back to life again?
And I'm sorry if it offends, but I'm not "coming" to anyone. I'm not into man love. I mean, if that's not what _you_ mean, then okay. It's nice to spread love and joy and all that, but I'm not too certain what kind of "love" we're talking about here, so I'll have to pass. Can you _be_ any more cryptic??
And repenting for my sins? -- Again, I haven't built my church yet. But when I make millions off of convincing people like you to bring in the sheep (and therefore the money) -- I'll be sure to ask YAHUSHA (HUSHANOWAAAHAHAHAHAAAA! -- or whoever) to forgive me every time I buy a new jet with the money "earned" from the ignorance and guilt of others. "Sowwy. I won't do it again." will be my mantra -- At least until I need a new jet.
People like you are so kind. I am so blessed.
Also -- I'm not being insensitive.
I'm just being as pointless and as irrelevant as this post is to anyone's spirituality.
Keep it to yourself, man.