跳到正文
cccskills
免费在 GitHub 公开

assets-shader-get-data

Get detailed data about a shader asset in the Unity project. Returns shader properties, subshaders, passes, compilation errors, and supported status. Use 'assets-find' tool with filter 't:Shader' to find shaders, or 'assets-shader-list-all' tool to list all shader names.

中文简介正在准备中。当前显示原文说明。

集成工具Unity
查看安装方法

包含的文件(1)

  • SKILL.md11.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Assets / Shader / Get Data

How to Call

unity-mcp-cli run-tool assets-shader-get-data --input '{
  "assetRef": "string_value",
  "includeMessages": "string_value",
  "includeProperties": "string_value",
  "includeSubshaders": "string_value",
  "includeSourceCode": "string_value"
}'

For complex input (multi-line strings, code), save the JSON to a file and use:

unity-mcp-cli run-tool assets-shader-get-data --input-file args.json

Or pipe via stdin (recommended):

unity-mcp-cli run-tool assets-shader-get-data --input-file - <<'EOF'
{"param": "value"}
EOF

Troubleshooting

If unity-mcp-cli is not found, either install it globally (npm install -g unity-mcp-cli) or use npx unity-mcp-cli instead. Read the /unity-initial-setup skill for detailed installation instructions.

Input

NameTypeRequiredDescription
assetRefanyYesReference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders.
includeMessagesanyNoInclude compilation error and warning messages. Default: true
includePropertiesanyNoInclude shader properties (uniforms) list. Default: false
includeSubshadersanyNoInclude subshader and pass structure. Default: false
includeSourceCodeanyNoInclude pass source code in subshader data. Requires 'includeSubshaders' to be true. Can produce very large responses. Default: false

Input JSON Schema

{
  "type": "object",
  "properties": {
    "assetRef": {
      "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Runtime.Data.AssetObjectRef"
    },
    "includeMessages": {
      "$ref": "#/$defs/System.Boolean"
    },
    "includeProperties": {
      "$ref": "#/$defs/System.Boolean"
    },
    "includeSubshaders": {
      "$ref": "#/$defs/System.Boolean"
    },
    "includeSourceCode": {
      "$ref": "#/$defs/System.Boolean"
    }
  },
  "$defs": {
    "System.Type": {
      "type": "string"
    },
    "com.IvanMurzak.Unity.MCP.Runtime.Data.AssetObjectRef": {
      "type": "object",
      "properties": {
        "instanceID": {
          "type": "integer",
          "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
        },
        "assetType": {
          "$ref": "#/$defs/System.Type",
          "description": "Type of the asset."
        },
        "assetPath": {
          "type": "string",
          "description": "Path to the asset within the project. Starts with 'Assets/'"
        },
        "assetGuid": {
          "type": "string",
          "description": "Unique identifier for the asset."
        }
      },
      "required": [
        "instanceID"
      ],
      "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
    },
    "System.Boolean": {
      "type": "boolean"
    }
  },
  "required": [
    "assetRef"
  ]
}

Output

Output JSON Schema

{
  "type": "object",
  "properties": {
    "result": {
      "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderData"
    }
  },
  "$defs": {
    "com.IvanMurzak.Unity.MCP.Runtime.Data.AssetObjectRef": {
      "type": "object",
      "properties": {
        "instanceID": {
          "type": "integer",
          "description": "instanceID of the UnityEngine.Object. If this is '0' and 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'."
        },
        "assetType": {
          "$ref": "#/$defs/System.Type",
          "description": "Type of the asset."
        },
        "assetPath": {
          "type": "string",
          "description": "Path to the asset within the project. Starts with 'Assets/'"
        },
        "assetGuid": {
          "type": "string",
          "description": "Unique identifier for the asset."
        }
      },
      "required": [
        "instanceID"
      ],
      "description": "Reference to UnityEngine.Object asset instance. It could be Material, ScriptableObject, Prefab, and any other Asset. Anything located in the Assets and Packages folders."
    },
    "System.Type": {
      "type": "string"
    },
    "System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderMessageData>": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderMessageData"
      }
    },
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderMessageData": {
      "type": "object",
      "properties": {
        "Message": {
          "type": "string",
          "description": "The error or warning message text."
        },
        "Line": {
          "type": "integer",
          "description": "The line number in the shader source where the issue occurs."
        },
        "Severity": {
          "type": "string",
          "description": "Severity level (e.g. 'Error', 'Warning')."
        },
        "Platform": {
          "type": "string",
          "description": "The platform on which the error occurs (e.g. 'OpenGLCore', 'D3D11')."
        }
      },
      "required": [
        "Line"
      ]
    },
    "System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderPropertyData>": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderPropertyData"
      }
    },
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderPropertyData": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "Property name as used in shader code (e.g. '_MainTex', '_Color')."
        },
        "Description": {
          "type": "string",
          "description": "Human-readable description/display name of the property."
        },
        "Type": {
          "type": "string",
          "description": "Property type (e.g. 'Color', 'Float', 'Range', 'Texture', 'Vector', 'Int')."
        },
        "Flags": {
          "type": "string",
          "description": "Property flags (e.g. 'None', 'HideInInspector', 'PerRendererData')."
        },
        "NameId": {
          "type": "integer",
          "description": "The unique name ID for this property."
        },
        "RangeMin": {
          "type": "number",
          "description": "Minimum value for Range properties. Null for non-range properties."
        },
        "RangeMax": {
          "type": "number",
          "description": "Maximum value for Range properties. Null for non-range properties."
        },
        "DefaultTextureName": {
          "type": "string",
          "description": "Default texture name for Texture properties. Null if not applicable."
        },
        "Attributes": {
          "$ref": "#/$defs/System.Collections.Generic.List<System.String>",
          "description": "Custom attributes applied to this property. Null if none."
        }
      },
      "required": [
        "NameId"
      ]
    },
    "System.Collections.Generic.List<System.String>": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+SubshaderData>": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+SubshaderData"
      }
    },
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+SubshaderData": {
      "type": "object",
      "properties": {
        "Index": {
          "type": "integer",
          "description": "Index of this subshader within the shader."
        },
        "PassCount": {
          "type": "integer",
          "description": "Number of passes in this subshader."
        },
        "Passes": {
          "$ref": "#/$defs/System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+PassData>",
          "description": "List of passes in this subshader. Null if no passes."
        }
      },
      "required": [
        "Index",
        "PassCount"
      ]
    },
    "System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+PassData>": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+PassData"
      }
    },
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+PassData": {
      "type": "object",
      "properties": {
        "Index": {
          "type": "integer",
          "description": "Index of this pass within the subshader."
        },
        "Name": {
          "type": "string",
          "description": "Name of the pass. Null if unnamed."
        },
        "SourceCode": {
          "type": "string",
          "description": "Source code of the pass. Null if unavailable."
        }
      },
      "required": [
        "Index"
      ]
    },
    "com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderData": {
      "type": "object",
      "properties": {
        "Reference": {
          "$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Runtime.Data.AssetObjectRef",
          "description": "Reference to the shader asset for future operations."
        },
        "Name": {
          "type": "string",
          "description": "Full name of the shader (e.g. 'Standard', 'Universal Render Pipeline/Lit')."
        },
        "IsSupported": {
          "type": "boolean",
          "description": "Whether the shader is supported on the current GPU and platform."
        },
        "RenderQueue": {
          "type": "integer",
          "description": "The render queue value of the shader."
        },
        "HasErrors": {
          "type": "boolean",
          "description": "Whether the shader has any compilation errors."
        },
        "PropertyCount": {
          "type": "integer",
          "description": "Number of properties exposed by the shader."
        },
        "PassCount": {
          "type": "integer",
          "description": "Total number of passes in the shader."
        },
        "RenderType": {
          "type": "string",
          "description": "The RenderType tag value from the first pass, if set."
        },
        "Messages": {
          "$ref": "#/$defs/System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderMessageData>",
          "description": "Compilation messages including errors and warnings. Null if no messages."
        },
        "Properties": {
          "$ref": "#/$defs/System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+ShaderPropertyData>",
          "description": "List of shader properties (uniforms). Null if the shader has no properties."
        },
        "Subshaders": {
          "$ref": "#/$defs/System.Collections.Generic.List<com.IvanMurzak.Unity.MCP.Editor.API.Tool_Assets_Shader+SubshaderData>",
          "description": "List of subshaders with their passes. Null if shader data is unavailable."
        }
      },
      "required": [
        "IsSupported",
        "RenderQueue",
        "HasErrors",
        "PropertyCount",
        "PassCount"
      ]
    }
  },
  "required": [
    "result"
  ]
}

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

adopt

免费

Brownfield onboarding — audits existing project artifacts for template format compliance (not just existence), classifies gaps by impact, and produces a numbered migration plan. Run this when joining an in-progress project or upgrading from an older template version. Distinct from /project-stage-detect (which checks what exists) — this checks whether what exists will actually work with the template's skills.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

Creates an Architecture Decision Record (ADR) documenting a significant technical decision, its context, alternatives considered, and consequences. Every major technical choice should have an ADR.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

Validates completeness and consistency of the project architecture against all GDDs. Builds a traceability matrix mapping every GDD technical requirement to ADRs, identifies coverage gaps, detects cross-ADR conflicts, verifies engine compatibility consistency across all decisions, and produces a PASS/CONCERNS/FAIL verdict. The architecture equivalent of /design-review.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

art-bible

免费

Guided, section-by-section Art Bible authoring. Creates the visual identity specification that gates all asset production. Run after /brainstorm is approved and before /map-systems or any GDD authoring begins.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

Audits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

Generate per-asset visual specifications and AI generation prompts from GDDs, level docs, or character profiles. Produces structured spec files and updates the master asset manifest. Run after art bible and GDD/level design are approved, before production begins.

中文简介正在准备中。当前显示原文说明。

IdoCohen560/claude-unity-game-studio222026年7月8日 更新

查看 IdoCohen560 的全部技能

报告此技能的问题