Contextual Actions HUD
myBad Studios
$4.95
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
03/19(2018) |
4.95 |
11/08(2024) |
4.95 |
Jump AssetStore
The Contextual Actions HUD is a convenient way to offer user interaction with your game, based on proximity to objects and provides your players with a visual cue of when actions are available to perform.For example: You can collect items only if it is within reach or speak to characters only if they are close enough to you. You can add as many icons as you like and have them do whatever you like.Simply drag and drop a prefab onto the object you want to interact with and start selecting which of the buttons it will listen by selecting them from the drop down list. Step 2 is to drop another prefab on your player. This tests the distance between you and the object. It will then enable or disable the relevant icons when within range or not, respectively.Once you click on the button it will send the relevant message to your object so you just need to make sure your object knows how to react to that message. For example: You have a button that sends an "Interact" message. On your Elevator object you have a function called Interact and have it change the color of the button. On the lever in your dungeon you have a function called Interact that animates the lever and the cell door.In this manner you can have a consistent interface for your game but have your buttons be context aware, behaving differently on every object right throughout the game.The Contextual Actions HUD is made for UGUI and supports keyboard and mouse inputs:* Customize how many icons you display
* Layout your buttons using UGUI
* Use 1 graphic for enabled and disabled states
* Specify what function to call when pressed
* Optionally display the keyboard equivalent next to the icon
* Supports button taps and holding it down