Установка
SKILL.md
GameObject / Component / Get
Получить подробную информацию о конкретном Component на GameObject. Возвращает тип компонента, состояние enabled и, опционально, сериализованные поля и свойства. Используйте это для просмотра данных компонента перед их изменением. Используйте инструмент 'gameobject-find', чтобы получить список всех компонентов на GameObject.
Входные данные
gameObjectRef— целевой GameObject.componentRef— конкретный компонент для просмотра (сопоставляется по индексу или instance ID).includeFields(по умолчаниюtrue) — заполнить устаревшийFieldsсписок.includeProperties(по умолчаниюtrue) — заполнить устаревшийPropertiesсписок.deepSerialization(по умолчаниюfalse) — при заполнении устаревших списков рекурсивно обходить вложенные члены.
Чтение по путям (экономия токенов)
Укажите paths (список путей), чтобы прочитать только перечисленные поля/элементы через Reflector.TryReadAt, or viewQuery (a ViewQuery) для перехода к поддереву и/или фильтрации по regex имени / максимальной глубине / типу через Reflector.View. Результат возвращается в поле View ответа, а устаревшие Fields/Properties списки пропускаются. Эти два параметра взаимоисключающие — укажите не более одного.
Синтаксис путей
fieldName, nested/field, arrayField/[i], dictField/[key]. Ведущий #/ отбрасывается.
Как вызвать
unity-mcp-cli run-tool gameobject-component-get --input '{
"gameObjectRef": "string_value",
"componentRef": "string_value",
"includeFields": false,
"includeProperties": false,
"deepSerialization": false,
"paths": "string_value",
"viewQuery": "string_value"
}'
Для сложных входных данных (многострочные строки, код) сохраните JSON в файл и используйте:
unity-mcp-cli run-tool gameobject-component-get --input-file args.jsonИли передайте через stdin (рекомендуется):
unity-mcp-cli run-tool gameobject-component-get --input-file - <<'EOF' {"param": "value"} EOF
Устранение неполадок
If unity-mcp-cli не найден, либо установите его глобально (npm install -g unity-mcp-cli), либо используйте npx unity-mcp-cli вместо него. Прочитайте навык /unity-initial-setup для подробных инструкций по установке.
Входные данные
| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
gameObjectRef | any | Да | Найти GameObject в открытом Prefab или в активной Scene. |
componentRef | any | Да | Ссылка на Component. Используется для поиска Component на GameObject. |
includeFields | boolean | No | Включить сериализованные поля компонента. |
includeProperties | boolean | No | Включить сериализованные свойства компонента. |
deepSerialization | boolean | No | Выполняет глубокую сериализацию, включая все вложенные объекты. В противном случае сериализуются только члены верхнего уровня. |
paths | any | No | Опционально. Список путей для индивидуального чтения через Reflector.TryReadAt. Если указан, устаревшие списки 'Fields'/'Properties' пропускаются, а результат возвращается в 'View'. Синтаксис путей: 'fieldName', 'nested/field', 'arrayField/[i]', 'dictField/[key]'. Взаимоисключающий с 'viewQuery'. |
viewQuery | any | No | Опционально. Фильтр view-запроса, маршрутизируемый через Reflector.View. Если указан, устаревшие списки 'Fields'/'Properties' пропускаются, а отфильтрованное поддерево возвращается в 'View'. Взаимоисключающий с 'paths'. |
Входная JSON-схема
{
"type": "object",
"properties": {
"gameObjectRef": {
"$ref": "#/$defs/AIGD.GameObjectRef"
},
"componentRef": {
"$ref": "#/$defs/AIGD.ComponentRef"
},
"includeFields": {
"type": "boolean"
},
"includeProperties": {
"type": "boolean"
},
"deepSerialization": {
"type": "boolean"
},
"paths": {
"$ref": "#/$defs/System.Collections.Generic.List(System.String)"
},
"viewQuery": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.ViewQuery"
}
},
"$defs": {
"System.Type": {
"type": "string"
},
"AIGD.GameObjectRef": {
"type": "object",
"properties": {
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If it is '0' and 'path', 'name', 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'. Priority: 1 (Recommended)"
},
"path": {
"type": "string",
"description": "Path of a GameObject in the hierarchy Sample 'character/hand/finger/particle'. Priority: 2."
},
"name": {
"type": "string",
"description": "Name of a GameObject in hierarchy. Priority: 3."
},
"assetType": {
"$ref": "#/$defs/System.Type",
"description": "Type of the asset."
},
"assetPath": {
"type": "string",
"description": "Path to the asset within the project. Starts with 'Assets/'"
},
"assetGuid": {
"type": "string",
"description": "Unique identifier for the asset."
}
},
"required": [
"instanceID"
],
"description": "Find GameObject in opened Prefab or in the active Scene."
},
"AIGD.ComponentRef": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"description": "Component 'index' attached to a gameObject. The first index is '0' and that is usually Transform or RectTransform. Priority: 2. Default value is -1."
},
"typeName": {
"type": "string",
"description": "Component type full name. Sample 'UnityEngine.Transform'. If the gameObject has two components of the same type, the output component is unpredictable. Priority: 3. Default value is null."
},
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If this is '0', then it will be used as 'null'."
}
},
"required": [
"index",
"instanceID"
],
"description": "Component reference. Used to find a Component at GameObject."
},
"System.Collections.Generic.List(System.String)": {
"type": "array",
"items": {
"type": "string"
}
},
"com.IvanMurzak.ReflectorNet.Model.ViewQuery": {
"type": "object",
"properties": {
"Path": {
"type": "string",
"description": "Navigate to this path first, then serialize only that subtree. Path segments are separated by '/'. Use '[i]' for array/list index (e.g. 'users/[2]/name') and '[key]' for dictionary entry (e.g. 'config/[timeout]'). A leading '#/' is stripped automatically. Examples: 'admin/name', 'users/[0]/email', 'config/[timeout]'. Leave null to start from the root object."
},
"NamePattern": {
"type": "string",
"description": "Case-insensitive .NET regex pattern matched against field and property names. Only branches containing at least one match are kept in the result tree. Examples: 'orbitRadius' (exact name), 'orbit.*' (prefix match), 'radius|speed' (either name). When nothing matches, the root envelope is returned with empty fields/props. Leave null to return all fields and properties without filtering."
},
"MaxDepth": {
"type": "integer",
"description": "Maximum nesting depth of the returned serialized tree. 0 = root type name and value only — no nested fields or properties. 1 = one level of fields/props visible, their children stripped. 2 = two levels visible, and so on. Leave null (default) for unlimited depth."
},
"TypeFilter": {
"$ref": "#/$defs/System.Type",
"description": "When set, prunes the result tree to members whose runtime type is assignable to this type. Non-matching branches are removed; the root envelope is always preserved. Examples: typeof(float) keeps only float fields, typeof(IEnumerable) keeps only collections. Leave null to include members of any type."
}
}
}
},
"required": [
"gameObjectRef",
"componentRef"
]
}
Выходные данные
Выходная JSON-схема
{
"type": "object",
"properties": {
"result": {
"$ref": "#/$defs/AIGD.GetComponentResponse"
}
},
"$defs": {
"AIGD.ComponentRef": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"description": "Component 'index' attached to a gameObject. The first index is '0' and that is usually Transform or RectTransform. Priority: 2. Default value is -1."
},
"typeName": {
"type": "string",
"description": "Component type full name. Sample 'UnityEngine.Transform'. If the gameObject has two components of the same type, the output component is unpredictable. Priority: 3. Default value is null."
},
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If this is '0', then it will be used as 'null'."
}
},
"required": [
"index",
"instanceID"
],
"description": "Component reference. Used to find a Component at GameObject."
},
"AIGD.ComponentDataShallow": {
"type": "object",
"properties": {
"instanceID": {
"type": "integer"
},
"typeName": {
"type": "string"
},
"isEnabled": {
"type": "string",
"enum": [
"False",
"True",
"NA"
]
}
},
"required": [
"instanceID",
"isEnabled"
]
},
"System.Collections.Generic.List(com.IvanMurzak.ReflectorNet.Model.SerializedMember)": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
}
},
"com.IvanMurzak.ReflectorNet.Model.SerializedMember": {
"type": "object",
"properties": {
"typeName": {
"type": "string",
"description": "Full type name. Eg: 'System.String', 'System.Int32', 'UnityEngine.Vector3', etc."
},
"name": {
"type": "string",
"description": "Object name."
},
"value": {
"description": "Value of the object, serialized as a non stringified JSON element. Can be null if the value is not set. Can be default value if the value is an empty object or array json."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
"description": "Nested field value."
},
"description": "Fields of the object, serialized as a list of 'SerializedMember'."
},
"props": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
"description": "Nested property value."
},
"description": "Properties of the object, serialized as a list of 'SerializedMember'."
}
},
"required": [
"typeName"
],
"additionalProperties": false
},
"com.IvanMurzak.ReflectorNet.Model.SerializedMemberList": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
}
},
"AIGD.GetComponentResponse": {
"type": "object",
"properties": {
"Reference": {
"$ref": "#/$defs/AIGD.ComponentRef",
"description": "Reference to the component for future operations."
},
"Index": {
"type": "integer",
"description": "Index of the component in the GameObject's component list."
},
"Component": {
"$ref": "#/$defs/AIGD.ComponentDataShallow",
"description": "Basic component information (type, enabled state)."
},
"Fields": {
"$ref": "#/$defs/System.Collections.Generic.List(com.IvanMurzak.ReflectorNet.Model.SerializedMember)",
"description": "Serialized fields of the component. Populated only on the legacy code path (no 'paths' / no 'viewQuery')."
},
"Properties": {
"$ref": "#/$defs/System.Collections.Generic.List(com.IvanMurzak.ReflectorNet.Model.SerializedMember)",
"description": "Serialized properties of the component. Populated only on the legacy code path (no 'paths' / no 'viewQuery')."
},
"View": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
"description": "Path-scoped read or view-query result, populated when 'paths' or 'viewQuery' was supplied. Null otherwise."
}
},
"required": [
"Index"
]
}
},
"required": [
"result"
]
}
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: gameobject-component-get](https://darkplay.ru/ai/skills/ivanmurzak-unity-mcp-gameobject-component-get)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
A11y Architectaffaan-m · Архитектор доступности, специализирующийся на соответствии WCAG 2.2 для веба и нативных…
React Build Resolveraffaan-m · Чинит сборки React в Vite, webpack, Next.js и других: JSX, гидратация, типы.
React Revieweraffaan-m · Ревьюер React/JSX: хуки, производительность, границы компонентов и безопасность.
Vue Revieweraffaan-m · Ревьюер Vue.js: Composition API, реактивность, архитектура компонентов, Pinia, Nuxt.
expoanthropics · Официальные навыки Expo для создания, развёртывания, обновления и отладки приложений…
figmaanthropics · Интеграция с платформой дизайна Figma. Доступ к файлам дизайна, извлечение информации о…
mintlifyanthropics · Создание документационных сайтов с Mintlify. Преобразует файлы не в markdown в корректно…
netsuite-suitecloudanthropics · Навыки агента NetSuite от Oracle — руководство по созданию объектов SuiteCloud…
resendanthropics · Навыки для работы с Resend: отправка и получение писем, интеграция с email API, агентский…
sonatype-guideanthropics · MCP-сервер Sonatype Guide для анализа цепочки поставок ПО и безопасности зависимостей…Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton