Files
GameDevTVObstacleDodge/Library/PackageCache/com.unity.cinemachine@5342685532bb/Documentation~/CinemachineEvents.md

1.5 KiB

Cinemachine Events

Cinemachine generates events whenever cameras are activated and deactivated, and also when blends are started and when they finish. Furthermore, an event is generated when there is a camera cut - that is, when the active Cinemachine Camera changes without blending.

When Cinemachine sends an event, it is sent globally via CinemachineCore. Scripts can add listeners to those events and take action based on them. Listeners receive events for all cameras.

Events are generated in every context that manages blends. This includes the CinemachineBrain, which handles blends at the highest level, but it also applies to Cinemachine Manager Cameras, which thenselves manage blends between their child cameras.

Sometimes it's desirable to have events sent only for a specific camera, so that scripts can be notified based on this specific camera's activity without having to provide code to filter the events. Cinemachine provides the following behaviours to execute this filtering logic.