simulate_click
Clicks a Unity UI node by panel UID plus ref key or path, using raycast hit-testing to confirm the target is topmost, or force mode to fire the handler directly when hit-testing fails.
Instructions
simulate_click tool. Write op. Clicks a UI node via PROJECT_UI's own simulate API.
Main path (no real input device, no screen coordinate): resolves the node by panel uid + refKey (panel PROJECT_NODE_REFERENCE key) OR path (transform path under the panel root), then calls:
mode='raycast' (default): PROJECT_CLICKABLE:PROJECT_CLICK_WITH_HIT_TEST(false) — raycasts at the node's screen point and only fires if it's the topmost/visible hit; returns whether it actually clicked (self-validating occlusion check).
mode='force': PROJECT_CLICKABLE:PROJECT_CLICK_DIRECT(false) — fires the handler with no hit-test (use when the node is known-good but raycast fails, e.g. off-screen).
PlayMode-only. Device-pixel clicking (screenXY via InputSystem.QueueStateEvent) is deferred to a later phase.
FINAL-VERIFICATION ROLE: when the user described repro steps, drive the same clicks here during final verification instead of calling internal handlers that bypass the input path; then capture_screenshot to evidence the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | raycast | |
| path | No | ||
| ref_key | No | ||
| panel_uid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||