Files
Hasebe/Library/PackageCache/com.unity.cinemachine@1b8d58983403/Documentation~/CinemachineEvents.md
T
2026-09-24 20:49:06 +03:00

1.9 KiB

Cinemachine Events

Cinemachine generates events in the following contexts:

  • Whenever cameras are activated and deactivated.
  • When blends are started and when they finish.
  • When there is a camera cut, that is, when the active Cinemachine Camera changes without blending.

Note

Cinemachine also exposes some Unity Events that you can use to send callbacks to Cinemachine objects. For more information about Unity Events, refer to Inspector-configurable custom events.

Cinemachine event flow

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

Events are generated in every context that manages blends. This includes the Cinemachine Brain, which handles blends at the highest level, but it also applies to Cinemachine Camera Managers, which themselves manage blends between their child cameras.

Filter Cinemachine events

Sometimes it's desirable to handle events sent for a specific Cinemachine Camera, a specific Cinemachine Camera Manager, or a specific Cinemachine Brain, so that scripts can be notified based on this specific object's activity without having to provide code to filter the events.

Cinemachine provides the following components to execute this filtering logic: