Skip to content
Development
Skill

/cinemachine

Set up Cinemachine Virtual Cameras

From plugin
unity-skills
1.8k82 skills4 commands
Install
$ npx -y skills add Besty0728/Unity-Skills --skill cinemachine --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cinemachine

Context preview

The summary Claude sees to decide when to auto-load this skill.

Set up Cinemachine Virtual Cameras

SKILL.md

cinemachine.SKILL.md
name: unity-cinemachine
description: Set up Cinemachine Virtual Cameras

> **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

  • Creating or tuning Cinemachine cameras
  • Configuring follow/look-at/noise
  • Building cinematic camera behavior
  • 创建或调校 Cinemachine 相机、设置跟随/注视/噪声、构建运镜效果

Cinemachine Skills

Control Cinemachine Virtual Cameras and brain settings. Works with Cinemachine **2.x and 3.x** through a runtime reflection adapter (`CinemachineAdapter` / `CinemachineSkills`).

Operating Mode

  • **Approval**:查询类 skill(`cinemachine_inspect_vcam` / `cinemachine_list_components` / `cinemachine_get_brain_info`,源码标 `SkillMode.SemiAuto`)直接执行;其余配置/创建类(`cinemachine_create_vcam` / `cinemachine_set_targets` / `cinemachine_set_lens` / `cinemachine_configure_body` / `cinemachine_configure_aim` 等,标 `SkillMode.FullAuto`)需用户 grant,grant 后服务端一步执行返结果。
  • **Auto / Bypass**:未被禁列表拦截的 skill 直接执行。
  • 本模块**含 Delete 类 skill**:`cinemachine_set_component`(替换/移除 pipeline component)、`cinemachine_target_group_remove_member`、`cinemachine_remove_extension` 标记为 `SkillOperation.Delete`,被 `IsForbiddenInSemi` 静态拦截 —— 仅 **Bypass** 模式或加入 **Allowlist** 才能调用。
  • **包依赖**:必须安装 `com.unity.cinemachine` 包(CM 2.x 或 3.x)。未安装时所有 skill 返回 `{ error = "Cinemachine is not installed. Install Cinemachine 2.x or 3.x via Package Manager." }` 的 stub —— 调用方应先用 `package_*` 系列 skill 确认安装状态。
  • **反射脆弱性**:CM2 ↔ CM3 之间 API 名变化大(`CinemachineVirtualCamera` → `CinemachineCamera`,`CinemachineComponentBase` 改名等)。本模块通过 `CinemachineAdapter` 反射桥接,遇 CM 早期预览版(< `3.0.0-pre.5`)可能因 API 漂移返回失败 —— 优先用 `cinemachine_inspect_vcam` 探测当前可用字段,再决定 `propertyName`。

**DO NOT** (common hallucinations):

  • `cinemachine_create` does not exist → use `cinemachine_create_vcam` for virtual cameras
  • `cinemachine_set_target` / `cinemachine_set_follow` / `cinemachine_set_lookat` do not exist → use `cinemachine_set_targets` (sets both Follow and LookAt in one call)
  • `cinemachine_add_brain` does not exist → CinemachineBrain is auto-added to Main Camera on first VCam creation
  • Cinemachine 2.x uses `CinemachineVirtualCamera`; Cinemachine 3.x uses `CinemachineCamera` — skills handle this automatically

Additional compatibility notes:

  • CM3 priority access should use `Priority.Value` as the lowest common API when writing compatibility code.
  • Early CM3 previews before `3.0.0-pre.5` changed core camera APIs significantly and are outside the current support baseline.

**Routing**:

  • For basic Game Camera operations → use `camera` module
  • For Scene View camera → use `camera` module's `camera_set_transform`/`camera_look_at`
  • For camera animation sequences → use `timeline` module with Cinemachine track

Skills

`cinemachine_create_vcam`

Create a new Virtual Camera. **Parameters:**

  • `name` (string): Name of the VCam GameObject.
  • `folder` (string): Parent folder path (default: "Assets/Settings").

`cinemachine_inspect_vcam`

Deeply inspect a VCam, returning fields and tooltips. **Parameters:**

  • `vcamName` (string, optional): Name of the VCam GameObject.
  • `instanceId` (int, optional): VCam instance ID.
  • `path` (string, optional): VCam hierarchy path.

`cinemachine_set_vcam_property`

Set any property on VCam or its pipeline components. **Parameters:**

  • `vcamName` (string): Name of the VCam.
  • `instanceId` (int, optional): VCam Instance ID.
  • `path` (string, optional): VCam hierarchy path.
  • `componentType` (string): "Main" (VCam itself), "Lens", or Component name (e.g. "OrbitalFollow").
  • `propertyName` (string): Field or property name.
  • `value` (object): New value.
  • `fov` (float, optional): Lens FOV shortcut. When supplied without `propertyName`, routes to `cinemachine_set_lens`.
  • `nearClip` (float, optional): Lens near clip shortcut.
  • `farClip` (float, optional): Lens far clip shortcut.
  • `orthoSize` (float, optional): Lens orthographic size shortcut.

`cinemachine_set_targets`

Set Follow and LookAt targets. **Parameters:**

  • `vcamName` (string): Name of the VCam.
  • `instanceId` (int, optional): VCam Instance ID (preferred for precision).
  • `path` (string, optional): VCam hierarchy path.
  • `followName` (string, optional): GameObject name to follow.
  • `lookAtName` (string, optional): GameObject name to look at.

`cinemachine_set_component`

Switch VCam pipeline component (Body/Aim/Noise). **Parameters:**

  • `vcamName` (string): Name of the VCam.
  • `instanceId` (int, optional): VCam Instance ID.
  • `path` (string, optional): VCam hierarchy path.
  • `stage` (string): "Body", "Aim", or "Noise".
  • `componentType` (string): Type name (e.g. "OrbitalFollow", "Composer") or "None" to remove.

`cinemachine_add_component`

> **DEPRECATED** — Use `cinemachine_set_component` instead for proper pipeline control (Body/Aim/Noise stages). Add a Cinemachine component (legacy, supports CM2 and CM3). **Parameters:**

  • `vcamName` (string): Name of the VCam.
  • `instanceId` (int, optional): VCam Instance ID.
  • `path` (string, optional): VCam hierarchy path.
  • `componentType` (string): Type name (e.g., "OrbitalFollow").

`cinemachine_set_lens`

Quickly configure Lens settings (FOV, Near, Far, OrthoSize) and the projection ModeOverride. **Parameters:**

  • `vcamName` (string): Name of the VCam.
  • `instanceId` (int, optional): VCam Instance ID.
  • `path` (string, optional): VCam hierarchy path.
  • `fov` (float, optional): Field of View.
  • `nearClip` (float, optional): Near Clip Plane.
  • `farClip` (float, optional): Far Clip Plane.
  • `orthoSize` (float, optional): Orthographic Size.
  • `mode` (string, optional): Writes the lens `ModeOverride`, i.e. the projection mode this VCam pushes to the Unity Camera when it goes live. Case-insensitive; valid values are `None` (leave the Camera's own pro
Read more
Ships withunity-skills

REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.

Get the whole plugin
Stats
1,761
Stars
164
Forks
Active
Maintenance
C#
Language
MIT
License
1d ago
Last commit
8mo ago
Created

Repo: Besty0728/Unity-Skills

Other skills on unity-skills.