Files
GameDevTVObstacleDodge/Library/PackageCache/com.unity.cinemachine@5342685532bb/Runtime/Helpers/CinemachineCameraManagerEvents.cs

40 lines
1.4 KiB
C#
Raw Normal View History

2026-01-08 16:50:20 +00:00
using UnityEngine;
namespace Unity.Cinemachine
{
/// <summary>
/// This component will generate mixer-specific events.
/// </summary>
[AddComponentMenu("Cinemachine/Helpers/Cinemachine Camera Manager Events")]
[SaveDuringPlay]
[HelpURL(Documentation.BaseURL + "manual/CinemachineCameraManagerEvents.html")]
public class CinemachineCameraManagerEvents : CinemachineMixerEventsBase
{
/// <summary>
/// This is the CinemachineBrain emitting the events. If null and the current
/// GameObject has a CinemachineBrain component, that component will be used.
/// </summary>
[Tooltip("This is the CinemachineCameraManager emitting the events. If null and the current "
+ "GameObject has a CinemachineCameraManager component, that component will be used.")]
public CinemachineCameraManagerBase CameraManager;
/// <summary>
/// Get the object being monitored. This is the object that will generate the events.
/// </summary>
/// <returns>The ICinemachineMixer object that is the origin of the events.</returns>
protected override ICinemachineMixer GetMixer() => CameraManager;
void OnEnable()
{
if (CameraManager == null)
TryGetComponent(out CameraManager);
InstallHandlers(CameraManager);
}
void OnDisable()
{
UninstallHandlers();
}
}
}