43 lines
1017 B
C#
43 lines
1017 B
C#
|
|
using CameraSystem;
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class CameraControllerBase : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private CameraSystem_Console _CameraConsole;
|
|
|
|
|
|
public virtual void InitialiseCameras()
|
|
{
|
|
Debug.LogError("[CameraControllerBase] This function has not been reimplemented, or is called from a child class.");
|
|
}
|
|
|
|
|
|
public void SwitchToLiveCamera(Camera SwitchTo)
|
|
{
|
|
for (int i = 0; i < _CameraConsole.camerasObjects.Length; i++)
|
|
{
|
|
if (_CameraConsole.camerasObjects[i] == SwitchTo)
|
|
{
|
|
_CameraConsole.SendLiveCamera(i);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual void DisableAllTriggers()
|
|
{
|
|
Debug.LogError("[CameraControllerBase] This function has not been reimplemented, or is called from a child class.");
|
|
}
|
|
|
|
public virtual void DisableAllSwitchers()
|
|
{
|
|
Debug.LogError("[CameraControllerBase] This function has not been reimplemented, or is called from a child class.");
|
|
}
|
|
}
|