Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

unity-materialUnity material 命令行

Agent Skill

unity-material 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

356

周安装

15

GitHub Stars

886

下载量

125
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unity-material(Unity material 命令行)
来源仓库:https://github.com/besty0728/unity-skills
仓库路径:skills/unity-material
安装命令:
npx skills add https://github.com/besty0728/unity-skills --skill unity-material
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/besty0728/unity-skills --skill unity-material

简介

unity-material 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过命令行调用,支持对 Unity 相关资源与协作流程的信息管理。
  • 安装前需确认权限范围、维护状态及是否触发联网或文件操作。
  • 建议结合原始 README 进一步核验具体功能与使用方式。

SKILL.md

Unity Material Skills

BATCH-FIRST: Use *_batch skills when operating on 2+ objects/materials.

Guardrails

Mode: Full-Auto required

DO NOT (common hallucinations):

  • material_set_metallic / material_set_smoothness do not exist → use material_set_float with propertyName="_Metallic" or "_Glossiness" (Standard) / "_Smoothness" (URP)
  • material_set_color r/g/b/a range is 0–1, not 0–255
  • material_set_property does not exist → use the specific setter: material_set_float, material_set_int, material_set_vector, material_set_color
  • material_get_color does not exist → use material_get_properties (returns all properties including colors)

Routing:

  • For shader changes → material_set_shader (this module)
  • For texture tiling → material_set_texture_scale / material_set_texture_offset
  • Pipeline-specific property names differ: check Render Pipeline Compatibility table in this doc
Object Targeting: Single-object skills accept name (GameObject name) or path (material asset path like Assets/Materials/X.mat). For asset-based operations, prefer path.

Skills Overview

Single ObjectBatch VersionUse Batch When
material_creatematerial_create_batchCreating 2+ materials
material_assignmaterial_assign_batchAssigning to 2+ objects
material_set_colormaterial_set_colors_batchSetting colors on 2+ objects
material_set_emissionmaterial_set_emission_batchSetting emission on 2+ objects

No batch needed:

  • material_set_texture - Set texture
  • material_set_texture_offset/scale - Texture tiling
  • material_set_float/int/vector - Set properties
  • material_set_keyword - Enable/disable shader keywords
  • material_set_render_queue - Set render queue
  • material_set_shader - Change shader
  • material_get_properties/keywords - Query properties
  • material_duplicate - Duplicate material

Skills

material_create

Create a new material (auto-detects render pipeline).

ParameterTypeRequiredDefaultDescription
namestringYes-Material name
shaderNamestringNoauto-detectShader (auto-detects URP/HDRP/Standard)
savePathstringNonullSave path (folder or full path)

material_create_batch

Create multiple materials.

Returns: {success, totalItems, successCount, failCount, results: [{success, name, path}]}

unity_skills.call_skill("material_create_batch", items=[
    {"name": "Red", "savePath": "Assets/Materials"},
    {"name": "Blue", "savePath": "Assets/Materials"},
    {"name": "Green", "savePath": "Assets/Materials"}
])

material_assign

Assign material to object's renderer.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID
pathstringNo*Material asset path (for asset)
materialPathstringYesMaterial to assign

material_assign_batch

Assign materials to multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, name, materialPath}]}

unity_skills.call_skill("material_assign_batch", items=[
    {"name": "Cube1", "materialPath": "Assets/Materials/Red.mat"},
    {"name": "Cube2", "materialPath": "Assets/Materials/Blue.mat"}
])

material_set_color

Set material color with optional HDR intensity.

ParameterTypeRequiredDefaultDescription
namestringNo*GameObject name
pathstringNo*Material asset path
r, g, bfloatNo1Color (0-1)
afloatNo1Alpha
propertyNamestringNoauto-detectColor property
intensityfloatNo1.0HDR intensity (>1 for bloom)

material_set_colors_batch

Set colors on multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, name}]}

unity_skills.call_skill("material_set_colors_batch", items=[
    {"name": "Cube1", "r": 1, "g": 0, "b": 0},
    {"name": "Cube2", "r": 0, "g": 1, "b": 0},
    {"name": "Cube3", "r": 0, "g": 0, "b": 1}
])

material_set_emission

Set emission color with auto-enable keyword.

ParameterTypeRequiredDefaultDescription
namestringNo*GameObject name
pathstringNo*Material asset path
r, g, bfloatNo1Emission color (0-1)
intensityfloatNo1.0HDR intensity (>1 for bloom)
enableEmissionboolNotrueAuto-enable _EMISSION keyword

material_set_emission_batch

Set emission on multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, name}]}

unity_skills.call_skill("material_set_emission_batch", items=[
    {"name": "Neon1", "r": 1, "g": 0, "b": 1, "intensity": 5.0},
    {"name": "Neon2", "r": 0, "g": 1, "b": 1, "intensity": 5.0}
])

material_set_texture

Set material texture.

ParameterTypeRequiredDefaultDescription
namestringNo*GameObject name
pathstringNo*Material asset path
texturePathstringYes-Texture asset path
propertyNamestringNoauto-detectTexture property

material_set_float

Set a float property on a material.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
propertyNamestringYesProperty name
valuefloatYesValue

material_set_int

Set an integer property on a material.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
propertyNamestringYesProperty name
valueintYesValue

material_set_keyword

Enable/disable shader keywords.

ParameterTypeRequiredDefaultDescription
namestringNo*GameObject name
pathstringNo*Material asset path
keywordstringYes-Keyword name
enableboolNotrueEnable or disable

Common Keywords: _EMISSION, _NORMALMAP, _METALLICGLOSSMAP, _ALPHATEST_ON, _ALPHABLEND_ON

material_get_properties

Get all material properties.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path

Returns: {colors, floats, vectors, textures, integers, keywords, renderQueue}

material_get_keywords

Get all enabled shader keywords on a material.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path

material_duplicate

Duplicate a material asset.

ParameterTypeRequiredDescription
sourcePathstringYesSource material path
newNamestringYesName for the duplicated material
savePathstringNoOptional folder/path override for the duplicated material

material_set_shader

Change the shader of a material.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
shaderNamestringYesShader name

material_set_vector

Set a Vector4 property on a material.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
propertyNamestringYesProperty name
x, y, z, wfloatYesVector components

material_set_texture_offset

Set texture offset (tiling position).

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
propertyNamestringNoTexture property name
x, yfloatYesOffset values

material_set_texture_scale

Set texture scale (tiling).

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
propertyNamestringNoTexture property name
x, yfloatYesScale values

material_set_render_queue

Set material render queue.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
renderQueueintYesRender queue value

material_set_gi_flags

Set material global illumination flags.

ParameterTypeRequiredDescription
namestringNo*GameObject name
pathstringNo*Material asset path
flagsstringYesGI flags (None/Emissive/RealtimeEmissive/BakedEmissive)

Example: Efficient Material Setup

import unity_skills

# BAD: 6 API calls
unity_skills.call_skill("material_create", name="Mat1", savePath="Assets/Materials")
unity_skills.call_skill("material_create", name="Mat2", savePath="Assets/Materials")
unity_skills.call_skill("material_set_color", path="Assets/Materials/Mat1.mat", r=1, g=0, b=0)
unity_skills.call_skill("material_set_color", path="Assets/Materials/Mat2.mat", r=0, g=0, b=1)
unity_skills.call_skill("material_assign", name="Cube1", materialPath="Assets/Materials/Mat1.mat")
unity_skills.call_skill("material_assign", name="Cube2", materialPath="Assets/Materials/Mat2.mat")

# GOOD: 3 API calls
unity_skills.call_skill("material_create_batch", items=[
    {"name": "Mat1", "savePath": "Assets/Materials"},
    {"name": "Mat2", "savePath": "Assets/Materials"}
])
unity_skills.call_skill("material_set_colors_batch", items=[
    {"path": "Assets/Materials/Mat1.mat", "r": 1, "g": 0, "b": 0},
    {"path": "Assets/Materials/Mat2.mat", "r": 0, "g": 0, "b": 1}
])
unity_skills.call_skill("material_assign_batch", items=[
    {"name": "Cube1", "materialPath": "Assets/Materials/Mat1.mat"},
    {"name": "Cube2", "materialPath": "Assets/Materials/Mat2.mat"}
])

Render Pipeline Compatibility

Skills auto-detect and adapt to your render pipeline:

PipelineDefault ShaderColor PropertyTexture Property
Built-inStandard_Color_MainTex
URPUniversal Render Pipeline/Lit_BaseColor_BaseMap
HDRPHDRP/Lit_BaseColor_BaseColorMap

Best Practices

  1. Save materials as assets for reuse
  2. Use material instances (by name) for runtime changes
  3. Use material assets (by path) for persistent changes
  4. Check shader property names in Unity Inspector
  5. URP/HDRP have different property names than Standard

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.21%
按下载量换算47

Claude

31.01%
按下载量换算39

Cursor

19.23%
按下载量换算24

Gemini CLI

8.04%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills