Установка
SKILL.md
GameObject / Component / Destroy
Уничтожает один или несколько компонентов у целевого GameObject. Не может уничтожить отсутствующие компоненты. Сначала используйте инструмент 'gameobject-find', чтобы найти целевой GameObject, и 'gameobject-component-get', чтобы получить сведения о компонентах.
Входные данные
gameObjectRef— целевой GameObject.destroyComponentRefs—ComponentRefListкомпонентов для уничтожения (сопоставляются с компонентами GameObject).
Поведение
Перебирает go.GetComponents<Component>(), пропуская null-записи (отсутствующие скрипты). Для каждого не-null компонента, совпадающего с одним из destroyComponentRefs, инструмент создаёт снимок ComponentRef, вызывает Object.DestroyImmediateи записывает ссылку на уничтоженный компонент. Если ни один компонент не совпадает, выбрасывает исключение с текстом справки из Error.NotFoundComponents (который включает предварительный просмотр всех доступных компонентов на GameObject).
Как вызвать
unity-mcp-cli run-tool gameobject-component-destroy --input '{
"gameObjectRef": "string_value",
"destroyComponentRefs": "string_value"
}'
Для сложных входных данных (многострочные строки, код) сохраните JSON в файл и используйте:
unity-mcp-cli run-tool gameobject-component-destroy --input-file args.jsonИли передайте через stdin (рекомендуется):
unity-mcp-cli run-tool gameobject-component-destroy --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. |
destroyComponentRefs | any | Да | Массив ссылок на компоненты. Используется для поиска Component в GameObject. |
Входная JSON-схема
{
"type": "object",
"properties": {
"gameObjectRef": {
"$ref": "#/$defs/AIGD.GameObjectRef"
},
"destroyComponentRefs": {
"$ref": "#/$defs/AIGD.ComponentRefList"
}
},
"$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."
},
"AIGD.ComponentRefList": {
"type": "array",
"items": {
"$ref": "#/$defs/AIGD.ComponentRef",
"description": "Component reference. Used to find a Component at GameObject."
},
"description": "Component reference array. Used to find Component at GameObject."
}
},
"required": [
"gameObjectRef",
"destroyComponentRefs"
]
}
Выходные данные
Выходная JSON-схема
{
"type": "object",
"properties": {
"result": {
"$ref": "#/$defs/AIGD.DestroyComponentsResponse"
}
},
"$defs": {
"AIGD.ComponentRefList": {
"type": "array",
"items": {
"$ref": "#/$defs/AIGD.ComponentRef",
"description": "Component reference. Used to find a Component at GameObject."
},
"description": "Component reference array. Used to find Component at GameObject."
},
"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.DestroyComponentsResponse": {
"type": "object",
"properties": {
"DestroyedComponents": {
"$ref": "#/$defs/AIGD.ComponentRefList",
"description": "List of destroyed components."
}
}
}
},
"required": [
"result"
]
}
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: gameobject-component-destroy](https://darkplay.ru/ai/skills/ivanmurzak-unity-mcp-gameobject-component-destroy)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
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