Quick Start Guide ⏱
Let's build a simple Main Menu with a Play button that takes us to a Gameplay screen.
Step 1: Define your IDs 🆔
Before creating GameObjects, we define the "Vocabulary" of our UI.
- Open Tools > HookUI > Dashboard.
- Go to the Views tab.
- Create a Category:
General. - Add ID:
MainMenu. - Add ID:
Gameplay.
- Create a Category:
- Go to the Buttons tab.
- Add ID:
PlayButtonunderGeneralCategory.
- Add ID:
Check: Your database now "knows" these screens and buttons exist.
Step 2: Create the Views in Scene
-
In your Canvas, create an empty Panel. Rename it
View_MainMenu. -
Add the HookView component.
- Category:
General. - ID:
MainMenu. - Start Behavior:
Instant Show(since it's the first screen).
- Category:
-
Inside this panel, create a UI Button.
-
Add the HookButton component to the button.
- Category:
General. - ID:
PlayButton. - On Click: (Optional) Connect to your own logic, but HookUI will handle navigation automatically.
- Category:
-
Duplicate
View_MainMenu, rename toView_Gameplay.- ID:
Gameplay. - Start Behavior:
Instant Hide(it starts hidden). - Delete the Play button from here (or change it to something else).
- ID:
Result: You have two functional Views in the scene, registered to the system.
Step 3: Connect the Flow
- Open Tools > HookUI > Flow Editor.
- Right-Click > Create Screen Node.
- Select
General/MainMenu. - Click "+ Add Output" and select
PlayButton.
- Select
- Right-Click > Create Screen Node.
- Select
General/Gameplay.
- Select
- Connect the dots: Drag the wire from the
PlayButtonport on the MainMenu node to theInputport of the Gameplay node. - Set Start Node: Right-click the
MainMenunode header and check "Start Node" (or ensure the green "Start" text is visible). - Click Save Graph.
Step 4: Play! ▶
Hit Play in Unity.
- Verify the Console: You should see
[HookUI] [Core] Flow Initialized. - Click the Play Button.
- The
MainMenushould hide, andGameplayshould show.
Congratulations! You've just built decoupled UI navigation without writing a single line of code.