For NPCs in my project when you walk up to them and look at them it says “Speak With Whoever” but I want it to show the interaction key.
I have an Input for Interact set to E and I want the text to say
" ‘E’ Speak With Whoever "
interactionText.text = (Input.GetKey("Interact").ToString() + " Speak With " + hit.collider.tag.ToString());
Call me crazy but couldn’t you just do
interactionText.text = "'E'" + " Speak With " + hit.collider.tag.ToString();
Well if the player were to change their controls I want it to pull from the input manager so that it changes.
What? That’s a feature in pretty much every single game. The UI will update it’s prompts based on your actual keybindings. Why would Unity Technologies not think of this?
Am I really going to have to write my own input manager?
Vryken
July 26, 2020, 7:28am
7
The InputAction
object from the new input system package has a name property.
1 Like