Uloop Simulate Mouse Ui logo

Uloop Simulate Mouse Ui

Community
hatayama
uloop-simulate-mouse-ui

Simulate PlayMode EventSystem UI mouse actions using screen coordinates. Use for UI clicks, long-presses, or drags from annotated screenshots.

Overview

Publisherhatayama
Repositoryunity-cli-loop
Skill nameuloop-simulate-mouse-ui
Stars
578
Forks
49
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hatayama on GitHub. Read the source before you install it.

Installation

Install the Uloop Simulate Mouse Ui AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-mouse-ui
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hatayama/unity-cli-loop.git /tmp/unity-cli-loop
mkdir -p .claude/skills
cp -r /tmp/unity-cli-loop/.agents/skills/uloop-simulate-mouse-ui .claude/skills/uloop-simulate-mouse-ui
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Uloop Simulate Mouse Ui in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Uloop Simulate Mouse Ui on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Uloop Simulate Mouse Ui is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Task

Simulate mouse interaction on Unity PlayMode UI.

Workflow

  1. Ensure Unity is in PlayMode (use uloop control-play-mode --action Play if not)
  2. Get UI element info: uloop screenshot --capture-mode rendering --annotate-elements --elements-only
  3. Use the AnnotatedElements array to find the target element by Path or Name (labels are ordered by SortingOrder/SiblingIndex, which can differ from the real draw order, so do not choose a target by A, B, ... alone). Use Interaction to distinguish click targets from drag/drop/text targets, then use SimX/SimY directly as --x/--y coordinates.
  4. Execute the needed uloop simulate-mouse-ui commands
  5. Inspect the result with the lightest useful evidence: runtime state, logs, or a screenshot
  6. When this UI input verifies a state transition, use Pause Point inspection from the section below as the standard frame proof
  7. Report what happened and which evidence was used

Tool Reference

bash
uloop simulate-mouse-ui --action <action> --x <x> --y <y> [options]

Parameters

ParameterTypeDefaultDescription
--actionenumClickClick - click at position, Drag - one-shot drag, DragStart - begin drag and hold, DragMove - move while holding drag, DragEnd - release drag, LongPress - press and hold for --duration seconds
--xnumber0Target X position in screen pixels (origin: top-left). For Drag action, this is the destination.
--ynumber0Target Y position in screen pixels (origin: top-left). For Drag action, this is the destination.
--from-xnumber0Start X position for Drag action (origin: top-left). Drag starts here and moves to --x,--y.
--from-ynumber0Start Y position for Drag action (origin: top-left). Drag starts here and moves to --x,--y.
--drag-speednumber2000Drag speed in pixels per second (0 for instant). 2000 is fast (default), 200 is slow enough to watch. Applies to Drag, DragMove, and DragEnd actions.
--durationnumber0.5Hold duration in seconds for LongPress action (max 30).
--buttonenumLeftMouse button. Click and LongPress support Left, Right, and Middle. Drag actions support Left only; other buttons return an error.
--bypass-raycastflag-For Click, LongPress, Drag, and DragStart, bypass EventSystem raycast and dispatch pointer events directly to --target-path. Use when a raycast-blocking overlay visually covers the intended target.
--target-pathstring""Hierarchy path of the target GameObject, for example Canvas/Panel/Button. Required when --bypass-raycast is used with Click, LongPress, Drag, or DragStart; prefer AnnotatedElements[].Path from screenshot JSON.
--drop-target-pathstring""Optional hierarchy path of a drop target for Drag or DragEnd, for example Canvas/DropZone. Use this when the drop zone is also behind a raycast blocker.

Actions

ActionEvent FiredDescription
ClickPointerDown → PointerUp → PointerClickClick at (x, y) with the selected --button
LongPressPointerDown → (hold) → PointerUpPress and hold at (x, y) for --duration seconds, then release. No PointerClick is fired.
DragBeginDrag → Drag×N → EndDragOne-shot drag from (fromX, fromY) to (x, y) at the specified speed
DragStartBeginDragBegin drag at (x, y) and hold
DragMoveDrag×NAnimate from current position to (x, y) at the specified speed
DragEndDrag×N → EndDragAnimate to (x, y) at the specified speed, then release drag

Split Drag Rules

  • DragStart must be called before DragMove or DragEnd
  • DragEnd must be called to release an active drag — failing to call it leaves drag state stuck
  • Calling DragMove or DragEnd without an active drag returns an error

Coordinate System

  • Origin is top-left (0, 0)
  • All positions are in screen pixels
  • Get coordinates from AnnotatedElements JSON (SimX/SimY) — do NOT look up GameObject positions
  • --bypass-raycast still uses coordinates for pointer event positions, but chooses the clicked, long-pressed, or dragged GameObject by --target-path
  • If --target-path or --drop-target-path matches multiple active GameObjects, the command fails instead of choosing an arbitrary duplicate
  • Device Simulator play view is supported. Prefer uloop screenshot --capture-mode rendering --annotate-elements for coordinates; they use the simulated device resolution (Handles.GetMainGameViewSize() / Screen), not the Simulator chrome scale.

Pause Point Inspection (Standard for E2E)

For standard frame proof when this UI input drives a state transition, follow the uloop-pause-point skill — it covers line placement and interruption semantics. Tool-specific note: if InterruptedByPausePoint: true, Success: true only means the command ended cleanly; read Message first — it states whether the pointer event was already dispatched before the pause (only the overlay animation was interrupted) or the pause landed first (no pointer event was fired). Clear inspection-only pause points (uloop clear-pause-point --all) before final validation.

Examples

bash
# Click a button at screen position
uloop simulate-mouse-ui --action Click --x 400 --y 300

# Force-click a button behind a raycast blocker by path
uloop simulate-mouse-ui --action Click --x 400 --y 300 --bypass-raycast --target-path "Canvas/Panel/Button"

# Force-drag and dispatch Drop to a blocked drop zone
uloop simulate-mouse-ui --action Drag --from-x 400 --from-y 300 --x 600 --y 300 --bypass-raycast --target-path "Canvas/Item" --drop-target-path "Canvas/DropZone"

# Long-press a button for 3 seconds
uloop simulate-mouse-ui --action LongPress --x 400 --y 300 --duration 3.0

# One-shot drag (start to end in one call)
uloop simulate-mouse-ui --action Drag --from-x 400 --from-y 300 --x 600 --y 300

# Slow drag for visual inspection
uloop simulate-mouse-ui --action Drag --from-x 400 --from-y 300 --x 600 --y 300 --drag-speed 200

# Split drag with hold (for inspection between steps)
uloop simulate-mouse-ui --action DragStart --x 400 --y 300
uloop screenshot --window-name Game
uloop simulate-mouse-ui --action DragMove --x 500 --y 300
uloop simulate-mouse-ui --action DragEnd --x 600 --y 300

Prerequisites

  • Unity must be in PlayMode
  • Target scene must have an EventSystem GameObject
  • UI elements must have a GraphicRaycaster on their Canvas
  • If you need runtime mouse input rather than UI pointer events, simulate-mouse-input assumes the project uses the New Input System; otherwise prefer execute-dynamic-code

Output

The response reports Success, Message, Action, HitGameObjectName, the used coordinates, and InterruptedByPausePoint/PausePointHits. Two readings that matter: Click/LongPress on empty space still return Success = true with HitGameObjectName = null (drag actions on empty space fail), and on a pause-point interruption Message states whether the pointer event fired before the pause. Field-by-field semantics are in references/output.md. Verify the visual outcome with a follow-up uloop screenshot --capture-mode rendering --annotate-elements.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Uloop Simulate Mouse Ui AI skill do?

Simulate PlayMode EventSystem UI mouse actions using screen coordinates. Use for UI clicks, long-presses, or drags from annotated screenshots.

Why use Uloop Simulate Mouse Ui on TypingMind?

Because you install it once and use it with any model. Uloop Simulate Mouse Ui is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Uloop Simulate Mouse Ui in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-mouse-ui. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Uloop Simulate Mouse Ui?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Uloop Simulate Mouse Ui?

As many as you like. As long as a model supports skills, you can use Uloop Simulate Mouse Ui with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Uloop Simulate Mouse Ui AI skill free?

Yes. It is published on GitHub by hatayama under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇