unity-material

Edit Unity material and shader properties across Built-in, URP, and HDRP pipelines.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-material-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-material
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/material
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-material-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity materials through the editor is slow and error-prone, especially when the same change must be applied to many objects or when property names differ between Built-in, URP, and HDRP render pipelines. This Skill lets you create, modify, assign, and inspect materials programmatically with automatic pipeline detection. ## Core Features & Use Cases - Material Creation & Assignment: Create materials with auto-detected shaders and assign them to GameObjects, with batch variants for operating on multiple objects in one call. - Property Editing: Set colors (with HDR intensity), emission, textures, floats, ints, vectors, keywords, render queue, GI flags, and swap shaders, targeting either a GameObject or a material asset path. - Property Inspection: Query all material properties grouped by type (colors, floats, vectors, textures, integers) and list enabled shader keywords to verify writes. - Use Case: To recolor three cubes, call material_create_batch to make the materials, material_set_colors_batch to color them by asset path, and material_assign_batch to assign them, replacing six individual calls with three. ## Quick Start Ask the AI to create a red material in Assets/Materials and assign it to the Cube object in the current Unity scene.

Frequently Asked Questions about unity-material

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change a material color in Unity with a script?

Use material_set_color with r, g, b values in the 0-1 range, targeting either a GameObject name or a material asset path. The skill auto-detects the correct color property (_BaseColor for URP/HDRP, _Color for Built-in) and reports which property it wrote via propertyUsed.

How do I set metallic or smoothness on a Unity material?

There is no dedicated metallic or smoothness setter; use material_set_float with propertyName "_Metallic" or "_Glossiness" for the Standard shader, or "_Smoothness" for URP. Check available property names first with material_get_properties.

Does this work with URP and HDRP materials?

Yes, the skills auto-detect the active render pipeline and adapt property names and default shaders accordingly. URP uses _BaseColor and _BaseMap, HDRP uses _BaseColor and _BaseColorMap, and Built-in uses _Color and _MainTex.

Why did changing one object's material recolor other objects?

Targeting a GameObject writes to its shared material asset on disk, so every object using that asset changes too. Create a new material with material_create, color it by asset path, then assign it with material_assign to affect only one object.

How do I change the shader of an existing material?

Call material_set_shader with the target GameObject or material asset path and the shaderName parameter. You can inspect the current shader and its properties first using material_get_properties.

Can I edit materials on many objects at once?

Yes, batch variants exist for creation, assignment, color, and emission: material_create_batch, material_assign_batch, material_set_colors_batch, and material_set_emission_batch. Each takes an items array and returns per-item success results.