关于 unity-volume
面向 Unity 2022.3+ 的 SRP Volume 技能模块,适用于配置 URP 和 HDRP 场景 Volume 与 VolumeProfile。它提供查询、创建和修改能力,并要求先读取组件的实时类型与参数,避免依赖猜测。
主要功能
- 01创建 VolumeProfile 资产
- 02创建全局或局部 Volume
- 03查询管线支持的组件类型
- 04检查组件及其参数
- 05添加、移除并设置组件参数
- 06批量设置组件参数
适用场景
- 01为场景创建全局或局部 Volume
- 02为 VolumeProfile 添加组件覆盖
- 03查看组件参数后调整效果值
MCP 相关
该模块提供用于查询和修改 Unity Volume 的技能,包括创建 VolumeProfile、管理 Volume 及配置组件参数。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ besty0728/ unity-skills --skill unity-volume安装后在 Claude Code 中输入/unity-volume确认已加载。
详细介绍
**调用此模块中的任何技能前:**如果你准备根据技能名称或描述猜测参数并调用技能,请先停止——先阅读此文件(或通过
GET /skills/recommend?includeSchema=true获取其架构)。如果你已从 recommend/schema 获取参数定义,则可直接进行 dryRun。
触发条件
- 设置 Volume
- 创建或加载 VolumeProfile
- 添加全局/局部 Volume
- 搭建 Volume、创建或加载 VolumeProfile、向场景添加全局/局部 Volume
Volume 技能
Unity 2022.3+ 的共享 SRP Volume 框架技能——通过 SRP Core 支持 URP 和 HDRP。
运行模式
- 查询技能(
volume_list_component_types、volume_get_component)为SkillMode.SemiAuto——在三种模式下均可无授权运行。 - 修改技能(
volume_profile_create、volume_create、volume_set_profile、volume_add_component、volume_set_parameter、volume_set_parameter_batch)为SkillMode.FullAuto——在 Approval 模式下需要用户授权(授权会触发一次服务器端执行并返回结果);在 Auto / Bypass 模式下会直接执行。 volume_remove_component带有SkillOperation.Delete,在 Approval / Auto 模式下会被自动禁止(NeverInSemi)。只有 Bypass 或由用户管理的 Allowlist 可以运行此技能。
SRP 包存根
此模块针对 com.unity.render-pipelines.core(SRP_CORE)编译。如果既未安装 URP,也未安装 HDRP(没有 SRP Core),每个技能都会返回存根 { error: "Scriptable Render Pipeline Core package … is not installed." }(RenderPipelineSkillsCommon.NoSRP())。此存根是诊断负载,不是权限拒绝——不需要授权,也不会被视为 NeverInSemi。看到此错误时,请先检查 project_get_render_pipeline。
防护规则
路由:
- 对于 Volume 容器/配置文件的 CRUD 操作:使用此模块
- 对于 Bloom/DOF/Tonemapping 等高级现代后处理效果:优先使用
postprocess
运行时优先规则:
- 在假设活动管线中存在某种组件类型之前,始终先调用
volume_list_component_types - 添加/创建后,使用
volume_get_component检查实际参数名称,再设置参数值 - 优先使用实时组件数据返回的准确参数名称,不要凭记忆猜测
volume_set_parameter_batch要求items是 JSON 数组字符串
技能
volume_profile_create
创建 VolumeProfile 资源。
volume_create
创建全局或局部 Volume GameObject。
volume_set_profile
为现有 Volume 指定或替换配置文件。
volume_list_component_types
列出活动 SRP 管线明确支持的 VolumeComponent 类型。
volume_add_component
向 VolumeProfile 添加 VolumeComponent 覆盖项。
volume_remove_component
从 VolumeProfile 移除 VolumeComponent 覆盖项。
volume_get_component
检查 VolumeComponent 覆盖项及其参数。
volume_set_parameter
设置 VolumeComponent 上的一个覆盖参数。
volume_set_parameter_batch
设置 VolumeComponent 上的多个覆盖参数。
准确签名
准确的名称、参数、默认值和返回值由 GET /skills/schema 或 unity_skills.get_skill_schema() 定义,而非此文件。