// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
///
/// A helper class to provide hooks into the Unity camera exclusive Lifecycle events
///
[AddComponentMenu("Scripts/MRTK/Core/CameraEventRouter")]
public class CameraEventRouter : MonoBehaviour
{
///
/// A callback to act upon MonoBehaviour.OnPreRender() without a script needing to exist on a Camera component
///
public event Action OnCameraPreRender;
private void OnPreRender()
{
OnCameraPreRender?.Invoke(this);
}
}
}