بنقرة واحدة
unity-material
Use when users want to create materials, set colors, textures, emission, or shader properties.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when users want to create materials, set colors, textures, emission, or shader properties.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when working with a Unity project via MCP — creating or editing scenes, GameObjects, components, prefabs, materials, UI, lighting, navmesh, animations, terrain, C# scripts, or any other Unity Editor task.
Use when users want to run Unity tests or read test results.
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project.
Use when about to write or install a custom Editor script, add a [MenuItem], build a custom Editor window, or create a one-off Editor helper — to check whether a ready-to-paste template already exists in tooling/<domain>/ before reaching for Unity_CreateScript.
Use when users want to create Canvas, Button, Text, Image, or other UI elements.
| name | unity-material |
| description | Use when users want to create materials, set colors, textures, emission, or shader properties. |
BATCH-FIRST: Use
*_batchskills when operating on 2+ objects/materials.
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–255material_set_property does not exist → use the specific setter: material_set_float, material_set_int, material_set_vector, material_set_colormaterial_get_color does not exist → use material_get_properties (returns all properties including colors)Routing:
material_set_shader (this module)material_set_texture_scale / material_set_texture_offsetObject Targeting: Single-object skills accept
name(GameObject name) orpath(material asset path likeAssets/Materials/X.mat). For asset-based operations, preferpath.
Recipe path rule: ../../recipes/material/<command>.md
| Single Object | Batch Version | Use Batch When |
|---|---|---|
material_create | material_create_batch | Creating 2+ materials |
material_assign | material_assign_batch | Assigning to 2+ objects |
material_set_color | material_set_colors_batch | Setting colors on 2+ objects |
material_set_emission | material_set_emission_batch | Setting emission on 2+ objects |
No batch needed:
material_set_texture - Set texturematerial_set_texture_offset/scale - Texture tilingmaterial_set_float/int/vector - Set propertiesmaterial_set_keyword - Enable/disable shader keywordsmaterial_set_render_queue - Set render queuematerial_set_shader - Change shadermaterial_get_properties/keywords - Query propertiesmaterial_duplicate - Duplicate materialCreate a new material (auto-detects render pipeline).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | - | Material name |
shaderName | string | No | auto-detect | Shader (auto-detects URP/HDRP/Standard) |
savePath | string | No | null | Save path (folder or full path) |
Create multiple materials.
Returns: {success, totalItems, successCount, failCount, results: [{success, name, path}]}
Assign material to object's renderer.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
instanceId | int | No* | Instance ID |
path | string | No* | Material asset path (for asset) |
materialPath | string | Yes | Material to assign |
Assign materials to multiple objects.
Returns: {success, totalItems, successCount, failCount, results: [{success, name, materialPath}]}
Set material color with optional HDR intensity.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No* | GameObject name | |
path | string | No* | Material asset path | |
r, g, b | float | No | 1 | Color (0-1) |
a | float | No | 1 | Alpha |
propertyName | string | No | auto-detect | Color property |
intensity | float | No | 1.0 | HDR intensity (>1 for bloom) |
Set colors on multiple objects.
Returns: {success, totalItems, successCount, failCount, results: [{success, name}]}
Set emission color with auto-enable keyword.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No* | GameObject name | |
path | string | No* | Material asset path | |
r, g, b | float | No | 1 | Emission color (0-1) |
intensity | float | No | 1.0 | HDR intensity (>1 for bloom) |
enableEmission | bool | No | true | Auto-enable _EMISSION keyword |
Set emission on multiple objects.
Returns: {success, totalItems, successCount, failCount, results: [{success, name}]}
Set material texture.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No* | GameObject name | |
path | string | No* | Material asset path | |
texturePath | string | Yes | - | Texture asset path |
propertyName | string | No | auto-detect | Texture property |
Set a float property on a material.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
propertyName | string | Yes | Property name |
value | float | Yes | Value |
Set an integer property on a material.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
propertyName | string | Yes | Property name |
value | int | Yes | Value |
Enable/disable shader keywords.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No* | GameObject name | |
path | string | No* | Material asset path | |
keyword | string | Yes | - | Keyword name |
enable | bool | No | true | Enable or disable |
Common Keywords: _EMISSION, _NORMALMAP, _METALLICGLOSSMAP, _ALPHATEST_ON, _ALPHABLEND_ON
Get all material properties.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
Returns: {colors, floats, vectors, textures, integers, keywords, renderQueue}
Get all enabled shader keywords on a material.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
Duplicate a material asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
sourcePath | string | Yes | Source material path |
newName | string | Yes | Name for the duplicated material |
savePath | string | No | Optional folder/path override for the duplicated material |
Change the shader of a material.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
shaderName | string | Yes | Shader name |
Set a Vector4 property on a material.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
propertyName | string | Yes | Property name |
x, y, z, w | float | Yes | Vector components |
Set texture offset (tiling position).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
propertyName | string | No | Texture property name |
x, y | float | Yes | Offset values |
Set texture scale (tiling).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
propertyName | string | No | Texture property name |
x, y | float | Yes | Scale values |
Set material render queue.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
renderQueue | int | Yes | Render queue value |
Set material global illumination flags.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | GameObject name |
path | string | No* | Material asset path |
flags | string | Yes | GI flags (None/Emissive/RealtimeEmissive/BakedEmissive) |
See ../../recipes/material/README.md for per-command C# templates.
Skills auto-detect and adapt to your render pipeline:
| Pipeline | Default Shader | Color Property | Texture Property |
|---|---|---|---|
| Built-in | Standard | _Color | _MainTex |
| URP | Universal Render Pipeline/Lit | _BaseColor | _BaseMap |
| HDRP | HDRP/Lit | _BaseColor | _BaseColorMap |