HookButton Component
The HookButton replaces the standard Unity Button for navigation purposes. It links a visual element to a specific ID in the database.
Inspector Properties
Identity
- Category: The Button ID's category.
- ID: The unique ID (e.g.,
Btn_Play). This string serves as the "Output Port" name in the Flow Graph.
Settings
- Interactable: Toggles the button state.
Events
- OnClick: Standard UnityEvent.
- OnHover: Triggered on pointer enter.
- State Requests:
OnRequestNormal,OnRequestHighlight,OnRequestPress, etc. Useful for custom visual handling (e.g., changing sprites or playing Tween animations).
Logging
When a user interacts with a HookButton, it logs to the Interaction channel in the HookUILogger.
Code API
public HookButton myButton;
void Start()
{
myButton.SetInteractable(false); // Disables input
}