unity-material

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-material-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-material
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/material
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-material-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity materials through an AI agent is error-prone: property names differ between Built-in, URP, and HDRP pipelines, and targeting a GameObject silently writes the shared material asset on disk, which can recolor every object using it. This Skill provides a guarded, pipeline-aware interface for creating, assigning, and modifying materials without those pitfalls. ## Core Features & Use Cases - Material creation and assignment: Create materials with auto-detected shaders per render pipeline and assign them to renderers, 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, texture tiling, GI flags, and swap shaders, with auto-detection of the correct property name per pipeline. - Inspection and guardrails: Query all material properties and enabled keywords, check which asset a write would target, and follow documented safe routes to avoid mutating shared assets unintentionally. - Use Case: An agent is asked to make three cubes red, green, and blue. It creates three materials in one batch call, sets their colors in one batch call, assigns them in one batch call, and verifies the result via material_get_properties instead of issuing nine separate calls. ## Quick Start Ask the agent to create a red material in Assets/Materials and assign it to the Cube GameObject 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 an AI agent?

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 for your pipeline and reports which property it actually wrote via the propertyUsed field.

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, along with the desired float value.

Does this work with URP and HDRP materials?

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

Why did changing one object's material recolor my whole scene?

Targeting a GameObject writes its renderer's shared material asset on disk, so every object using that asset changes too. Create a new material, edit it by asset path, then assign it to the object to affect only that object.

How do I change materials on many objects at once?

Use the batch variants: material_create_batch, material_set_colors_batch, material_set_emission_batch, and material_assign_batch each accept a JSON array of per-item objects. This reduces multiple operations to a single call and returns per-item success results.

How do I check which properties a Unity material has?

Call material_get_properties with a GameObject name or material asset path. It returns the shader, render queue, keywords, GI flags, and a properties dictionary grouped into colors, floats, vectors, textures, and integers.