maxhacker11

CameraRegister.cs

Jan 14th, 2024
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | Source Code | 0 0
  1. using Cinemachine;
  2. using UnityEngine;
  3.  
  4. public class CameraRegister : MonoBehaviour
  5. {
  6.     private void OnEnable()
  7.     {
  8.         CameraManager.Register(GetComponent<CinemachineVirtualCamera>());
  9.     }
  10.     private void OnDisable()
  11.     {
  12.         CameraManager.Unregister(GetComponent<CinemachineVirtualCamera>());
  13.     }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment