material_shader
Manage Unity materials and shaders: read and set properties, create and assign materials, change shaders, copy materials, and control shader keywords.
Instructions
Manages Unity materials and shaders. Actions:
get_material: Get material properties from a renderer
set_material_property: Set a material property value
create_material: Create a new material
assign_material: Assign material to a renderer
get_shader_properties: List all properties of a shader
get_available_shaders: List available shaders
set_shader: Change shader on a material
copy_material: Copy material properties
get_global_shader_property: Get global shader property
set_global_shader_property: Set global shader property
get_keywords: Get enabled shader keywords
enable_keyword: Enable a shader keyword
disable_keyword: Disable a shader keyword
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Material/shader action to perform | |
| keyword | No | Shader keyword name | |
| objectId | No | Instance ID of the GameObject with renderer | |
| colorValue | No | Color value (0-1 range) | |
| objectPath | No | Hierarchy path of the GameObject | |
| shaderName | No | Shader name (e.g., "Standard", "Universal Render Pipeline/Lit") | |
| texturePath | No | Asset path to texture | |
| vectorValue | No | Vector4 value | |
| materialPath | No | Asset path to material | |
| propertyName | No | Name of the material/shader property | |
| propertyType | No | Type of the property | |
| searchFilter | No | Filter for shader search | |
| materialIndex | No | Material index on the renderer (default: 0) | |
| propertyValue | No | Value to set for the property | |
| newMaterialName | No | Name for new material | |
| newMaterialPath | No | Path to save new material | |
| useSharedMaterial | No | Use shared material vs instance (default: false = instance) | |
| sourceMaterialPath | No | Source material to copy from |