Contextual Actions HUD
1. Simply drop a prefab on your player character to indicate that you wish to measure proximity to that game object
2. Then drop another prefab on each object you want the player to interact with. For each of these interact-able objects you will be presented with an array of actions that you can pick from to say which actions you want to be able to perform on that object.
3. Drop the final prefab onto your canvas and you are setup and ready to go. You can add or remove icons as you see fit. The kit includes an enum field that you can set to whatever values you wish. These are the values that will help you decide what actions are available on an object. Just make sure the number of enum values match the number of icons you want to use. By default this is set to 4 but this was just a personal choice and you can change this to whatever amount you want.
In the inspector you can set what function will be called when the button is pressed so you just need to make sure that one of the components on the object has the corresponding function.
This way you can have a consistent interface throughout your game where one button calls, say, “InteractWith” but depending on wether it is sending the message to an elevator, a lever in a dungeon, a chest you want to open or a door you want to unlock, the end result will depend on what you use it on.
Real useful, real simple, really quick to get up and running…
<!–The is also a free version of the kit available here. the differences between the fre version and this one: