- Home /
Question by
finnrayment · Apr 21, 2017 at 04:33 PM ·
guiinputinputmanagerinteractionkey pressed
Displaying the image of the interact key
I'm working on a game at the moment, and am wanting to implement something that alot of games actually do. The Long Dark for example (made in Unity) can do it, so I should also be able to!
What I want, is when the players RayCast hits an interactable object (already achieved), I want it to come up with text saying "Interact, etc...", but also have an image of whatever key that the interact button is bound to.
I'm sure I can just have a folder with all the seperate images of each key I want and name them according to the key they represent, but then how do I actually get the key from the input manager?
A really good example of this is the Valve games, they do it all the time:
screen-shot-2017-04-21-at-111451-am.png
(16.6 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612120316im_/https://answers.unity.com/themes/thub/images/avi.jpg)