Agent SkillsBesty0728/Unity-Skills › unity-decal

unity-decal

GitHub

用于在Unity URP中创建、配置和管理Decal Projector,包括启用渲染特性及查询状态。

SkillsForUnity/unity-skills~/skills/decal/SKILL.md Besty0728/Unity-Skills

Trigger Scenarios

在URP中添加贴花 配置Decal Projector 启用Decal Renderer Feature

Install

npx skills add Besty0728/Unity-Skills --skill unity-decal -g -y
More Options

Non-standard path

npx skills add https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/decal -g -y

Use without installing

npx skills use Besty0728/Unity-Skills@unity-decal

指定 Agent (Claude Code)

npx skills add Besty0728/Unity-Skills --skill unity-decal -a claude-code -g -y

安装 repo 全部 skill

npx skills add Besty0728/Unity-Skills --all -g -y

预览 repo 内 skill

npx skills add Besty0728/Unity-Skills --list

SKILL.md

Frontmatter
{
    "name": "unity-decal",
    "description": "Create and configure URP Decal Projectors"
}

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Adding decals in URP
  • Configuring a Decal Projector
  • Enabling the Decal Renderer Feature
  • 在 URP 中添加贴花、配置 Decal Projector、启用 Decal Renderer Feature

Decal Skills

URP Decal Projector creation and configuration (URP only; HDRP decal APIs are not covered here).

Operating Mode

  • Query skills (decal_get_info, decal_find_all) are SkillMode.SemiAuto — they run in all three modes without grant.
  • Mutating skills (decal_create, decal_set_properties, decal_set_properties_batch, decal_ensure_renderer_feature) are SkillMode.FullAuto — under Approval they need user grant (grant triggers one server-side execute returning the result); under Auto / Bypass they execute directly.
  • decal_delete carries SkillOperation.Delete and is auto-forbidden in Approval / Auto modes (NeverInSemi). Only Bypass or the user-managed Allowlist can run it.

URP Package Stub

This module is compiled against com.unity.render-pipelines.universal (URP). When URP is not installed, every skill returns a stub { error: "Universal Render Pipeline package … is not installed." } (RenderPipelineSkillsCommon.NoURP()). The stub is a diagnostic payload, not a permission denial — it does not require grant and is not treated as NeverInSemi.

Guardrails

Routing:

  • For renderer feature management in general: urp
  • For DecalProjector scene operations: this module

Runtime-first rules:

  • Call decal_ensure_renderer_feature before assuming the current URP renderer is decal-ready
  • Use decal_get_info / decal_find_all to discover real projector state before editing
  • decal_set_properties_batch expects items to be a JSON array string
  • This module targets the URP Decal workflow first; do not assume HDRP decal APIs are covered here

Skills

decal_create

Create a Decal Projector.

Parameter Type Required Default Description
name string No "Decal Projector" Name of the new GameObject
materialPath string No null Decal material asset path; left unassigned when omitted
x float No 0 World position X
y float No 0 World position Y
z float No 0 World position Z

decal_get_info

Inspect a Decal Projector.

Parameter Type Required Default Description
name string No* null GameObject name
instanceId int No* 0 GameObject instance ID
path string No* null GameObject hierarchy path

* Supply at least one locator — an empty call is refused up front rather than reported as "not found".

decal_set_properties

Modify Decal Projector properties. Every property below is applied only when supplied, so a call changes exactly the fields you name.

Parameter Type Required Default Description
name string No* null GameObject name
instanceId int No* 0 GameObject instance ID
path string No* null GameObject hierarchy path
materialPath string No null Decal material asset path
drawDistance float No null Max distance at which the decal is drawn
fadeScale float No null Fraction of drawDistance at which fading starts
fadeFactor float No null Overall opacity multiplier
startAngleFade float No null Angle (degrees) where angle-based fading begins
endAngleFade float No null Angle (degrees) where angle-based fading completes
uvScale string No null UV tiling as "x,y"
uvBias string No null UV offset as "x,y"
size string No null Projector box size as "x,y,z"
pivot string No null Projector pivot offset as "x,y,z"
renderingLayerMask uint No null Rendering layer mask bits
scaleMode string No null ScaleInvariant or InheritFromHierarchy

decal_find_all

List Decal Projectors in the scene.

Parameter Type Required Default Description
limit int No 50 Max projectors returned

decal_delete

Delete a Decal Projector GameObject.

Parameter Type Required Default Description
name string No* null GameObject name
instanceId int No* 0 GameObject instance ID
path string No* null GameObject hierarchy path

decal_set_properties_batch

Batch-edit Decal Projectors.

Parameter Type Required Default Description
items json string Yes - JSON array of {name, instanceId, path, materialPath, drawDistance, fadeScale, fadeFactor, startAngleFade, endAngleFade, uvScale, uvBias, size, pivot, renderingLayerMask, scaleMode} — same per-item keys as decal_set_properties

decal_ensure_renderer_feature

Ensure the target URP renderer has a DecalRendererFeature.

Parameter Type Required Default Description
assetPath string No null URP asset path; the active URP asset is used when omitted
rendererIndex int No -1 Renderer index within the URP asset; -1 selects the asset's default renderer
rendererDataPath string No null UniversalRendererData asset path — takes precedence over rendererIndex, and must belong to the resolved URP asset

Returns alreadyExists: true when the feature was already present, so the call is safe to repeat.


Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

Version History

  • 8c31c5a Current 2026-08-27 12:43
  • 5ee8388 2026-08-17 04:10

    精简主文档至 6.2KB,拆分协议细节与存档;新增 SKILL_GUIDE.md 指导模式说明;更新模块文档错误提示与版本锚点。

  • 25d511e 2026-08-13 09:13

    压缩 description 至约 5KB,路由说明移入 Triggers 章节

  • ec9f870 2026-07-05 14:39

Same Skill Collection

SkillsForUnity/unity-skills~/skills/addressables-design/SKILL.md
SkillsForUnity/unity-skills~/skills/addressables/SKILL.md
SkillsForUnity/unity-skills~/skills/adr/SKILL.md
SkillsForUnity/unity-skills~/skills/animator/SKILL.md
SkillsForUnity/unity-skills~/skills/behavior/SKILL.md
SkillsForUnity/unity-skills~/skills/blueprints/SKILL.md
SkillsForUnity/unity-skills~/skills/event/SKILL.md
SkillsForUnity/unity-skills~/skills/graphics/SKILL.md
SkillsForUnity/unity-skills~/skills/history/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-component/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-gameobject/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-material/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-scene/SKILL.md
SkillsForUnity/unity-skills~/skills/material/SKILL.md
SkillsForUnity/unity-skills~/skills/netcode-design/SKILL.md
SkillsForUnity/unity-skills~/skills/netcode/SKILL.md
SkillsForUnity/unity-skills~/skills/perception/SKILL.md
SkillsForUnity/unity-skills~/skills/pico-design/SKILL.md
SkillsForUnity/unity-skills~/skills/primetween/SKILL.md
SkillsForUnity/unity-skills~/skills/probuilder/SKILL.md
SkillsForUnity/unity-skills~/skills/profiler/SKILL.md
SkillsForUnity/unity-skills~/skills/project-scout/SKILL.md
SkillsForUnity/unity-skills~/skills/sample/SKILL.md
SkillsForUnity/unity-skills~/skills/shadergraph-design/SKILL.md
SkillsForUnity/unity-skills~/skills/SKILL.md
SkillsForUnity/unity-skills~/skills/smart/SKILL.md
SkillsForUnity/unity-skills~/skills/unity-cli/SKILL.md
SkillsForUnity/unity-skills~/skills/yaml-editing/SKILL.md
SkillsForUnity/unity-skills~/SKILL.md
SkillsForUnity/unity-skills~/skills/architecture/SKILL.md
SkillsForUnity/unity-skills~/skills/asmdef/SKILL.md
SkillsForUnity/unity-skills~/skills/asset/SKILL.md
SkillsForUnity/unity-skills~/skills/async/SKILL.md
SkillsForUnity/unity-skills~/skills/batch/SKILL.md
SkillsForUnity/unity-skills~/skills/bookmark/SKILL.md
SkillsForUnity/unity-skills~/skills/camera/SKILL.md
SkillsForUnity/unity-skills~/skills/cinemachine/SKILL.md
SkillsForUnity/unity-skills~/skills/cleaner/SKILL.md
SkillsForUnity/unity-skills~/skills/component/SKILL.md
SkillsForUnity/unity-skills~/skills/console/SKILL.md
SkillsForUnity/unity-skills~/skills/debug/SKILL.md
SkillsForUnity/unity-skills~/skills/dotween-design/SKILL.md
SkillsForUnity/unity-skills~/skills/dotween/SKILL.md
SkillsForUnity/unity-skills~/skills/editor/SKILL.md
SkillsForUnity/unity-skills~/skills/gameobject/SKILL.md
SkillsForUnity/unity-skills~/skills/hybridclr/SKILL.md
SkillsForUnity/unity-skills~/skills/importer/SKILL.md
SkillsForUnity/unity-skills~/skills/inspector/SKILL.md
SkillsForUnity/unity-skills~/skills/light/SKILL.md

Metadata

Files
0
Version
61f72e2
Hash
5c977f3d
Indexed
2026-07-05 14:39

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-28 05:11
浙ICP备14020137号-1 $Carte des visiteurs$