cinemachine-brain-ensure

Adds a CinemachineBrain component to a Unity Camera when one is missing.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/PMK95/GridSquad --skill cinemachine-brain-ensure-pmk95
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cinemachine-brain-ensure
Source: https://github.com/PMK95/GridSquad/tree/main/GridSquadUnity/.agents/skills/cinemachine-brain-ensure
Command: npx skills add https://github.com/PMK95/GridSquad --skill cinemachine-brain-ensure-pmk95

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Cinemachine virtual cameras have no effect on the rendered view unless a CinemachineBrain component exists on a real Unity Camera. This Skill removes the manual step of checking for and adding that component, preventing the common issue where CinemachineCamera setups silently fail to drive the rendering Camera. ## Core Features & Use Cases - Idempotent Brain Setup: Adds a CinemachineBrain to the target Camera only if one is missing, reusing any existing brain without duplication. - Flexible Camera Targeting: Accepts an optional GameObject reference (by instanceID, hierarchy path, or name) and falls back to Camera.main when none is provided. - Editor Integration: Marks the scene dirty, repaints the Editor, and returns the brain reference, camera name, and current default blend settings. - Use Case: While building a cutscene system with multiple CinemachineCameras, run this once against the main Camera to guarantee the brain exists before any virtual camera blending logic executes. ## Quick Start Ask the AI to ensure a CinemachineBrain exists on the main camera in the current Unity scene.

Frequently Asked Questions about cinemachine-brain-ensure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a CinemachineBrain to a camera in Unity?▼

Run the cinemachine-brain-ensure tool with an optional cameraRef pointing to the Camera GameObject. If omitted, it targets Camera.main. The tool adds the component only when missing and returns the brain reference.

Why is my CinemachineCamera not controlling the Unity camera?▼

CinemachineCameras have no effect unless a CinemachineBrain component exists on the rendering Camera. Ensuring a brain is present on the target Camera or Camera.main resolves this issue.

What happens if a CinemachineBrain already exists on the camera?▼

The operation is idempotent: an existing CinemachineBrain is reused and no duplicate is created. The response's created field returns false to indicate the brain already existed.

How do I specify which camera gets the CinemachineBrain?▼

Pass a cameraRef object using instanceID, hierarchy path, or GameObject name to target a specific Camera. When cameraRef is omitted, the tool uses Camera.main, the Camera tagged MainCamera.

What should I do if unity-mcp-cli is not found?▼

Install the CLI globally with npm install -g unity-mcp-cli, or invoke it through npx unity-mcp-cli. The unity-initial-setup skill contains detailed installation instructions.