Set up a basic Cinemachine environment
Set up your Unity project with the minimum required elements to make a functional Cinemachine environment:
- Create a passive Cinemachine Camera – with no specific behavior by definition,
- Ensure the Cinemachine Brain is present in the Unity Camera, and
- Adjust the Cinemachine Camera properties and see how it affects the Unity Camera.
Note
Your Scene must include only one Unity Camera – a GameObject with a Camera component.
Add a Cinemachine Camera
In the Scene view, navigate the Scene to get the point of view you want to frame with the Cinemachine Camera.
In the Unity menu, select GameObject > Cinemachine > Cinemachine Camera.
Unity adds a new GameObject with:
- A Cinemachine Camera component and
- A Transform that matches the latest position and orientation of the Scene view camera.
Verify the Cinemachine Brain presence
When you create a first Cinemachine Camera in a Scene, Unity automatically adds a Cinemachine Brain to the Unity Camera, unless the Unity Camera already includes one. To verify it:
In the Hierarchy, select your Unity Camera – the GameObject that includes the Camera component.
In the Inspector, verify that the GameObject includes a Cinemachine Brain component.
Note
You can manually add the Cinemachine Brain component as any other component to the Unity Camera GameObject if needed, but remember that only one Unity Camera in the Scene must have a Cinemachine Brain.
Note
Once the Cinemachine Brain is present, the Unity Camera's transform and lens settings are locked and cannot be changed directly in the Camera inspector. You can only change these properties of the camera by changing the corresponding properties of the CinemachineCamera.
Adjust the Cinemachine Camera properties
Open the Game view.
It shows the Scene through the lens of the Unity Camera according to the current settings of the Cinemachine Camera.In the Hierarchy, select the Cinemachine Camera GameObject.
In the Inspector, adjust the properties to precisely frame your shot according to your needs:
- In the Transform, adjust the Position and Rotation.
- In the Cinemachine Camera component, adjust the Lens properties.
Note
This Cinemachine Camera is the only one and latest you created, and as such, that you enabled. As a result, notice that the Unity Camera automatically inherits from the changes you perform on this Cinemachine Camera.
Next steps
Here are potential tasks you might want to do now: