AgentSkillsCN

uloop-find-game-objects

通过uloop CLI按搜索条件查找GameObject。适用场景:(1) 根据名称模式定位GameObject、(2) 按标签或层查找对象、(3) 搜索具有特定组件类型的对象。

SKILL.md
--- frontmatter
name: uloop-find-game-objects
description: "Find specific GameObjects in scene. Use when: searching for objects by name, finding objects with specific components, locating tagged/layered objects, getting currently selected GameObjects in Unity Editor, or when user asks to find GameObjects. Returns matching GameObjects with paths and components."

uloop find-game-objects

Find GameObjects with search criteria or get currently selected objects.

Usage

bash
uloop find-game-objects [options]

Parameters

ParameterTypeDefaultDescription
--name-patternstring-Name pattern to search
--search-modestringContainsSearch mode: Exact, Path, Regex, Contains, Selected
--required-componentsarray-Required components
--tagstring-Tag filter
--layerstring-Layer filter
--max-resultsinteger20Maximum number of results
--include-inactivebooleanfalseInclude inactive GameObjects

Search Modes

ModeDescription
ExactExact name match
PathHierarchy path search (e.g., Canvas/Button)
RegexRegular expression pattern
ContainsPartial name match (default)
SelectedGet currently selected GameObjects in Unity Editor

Examples

bash
# Find by name
uloop find-game-objects --name-pattern "Player"

# Find with component
uloop find-game-objects --required-components Rigidbody

# Find by tag
uloop find-game-objects --tag "Enemy"

# Regex search
uloop find-game-objects --name-pattern "UI_.*" --search-mode Regex

# Get selected GameObjects
uloop find-game-objects --search-mode Selected

# Get selected including inactive
uloop find-game-objects --search-mode Selected --include-inactive

Output

Returns JSON with matching GameObjects.

For Selected mode with multiple objects, results are exported to file:

  • Single selection: JSON response directly
  • Multiple selection: File at .uloop/outputs/FindGameObjectsResults/
  • No selection: Empty results with message