2026-03-17 시네머신 카메라 묶음 수정. 여러 카메라릭에서 공유하도록 공통 시네머신카메라리스트 분리
This commit is contained in:
@@ -43,7 +43,7 @@ protected override void Start()
|
||||
|
||||
if (currentTargetCam != null && currentTargetCam.Follow != null)
|
||||
{
|
||||
_controller = currentTargetCam.Follow.GetComponentInChildren<PlayerCharacterController>();
|
||||
_controller = currentTargetCam.Follow.GetComponentInParent<PlayerCharacterController>();
|
||||
}
|
||||
|
||||
if (_controller == null)
|
||||
|
||||
21
Assets/02_Scripts/Player/Camera/GeneralCameraRig.cs
Normal file
21
Assets/02_Scripts/Player/Camera/GeneralCameraRig.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
public class GeneralCameraRig : CameraRigBase
|
||||
{
|
||||
//CameraRigBase에 전달용
|
||||
[SerializeField] private List<CinemachineVirtualCameraBase> _myCameras = new List<CinemachineVirtualCameraBase>();
|
||||
protected override IReadOnlyList<CinemachineVirtualCameraBase> CameraCandidates => _myCameras;
|
||||
|
||||
public override void GetInputAxes(List<IInputAxisOwner.AxisDescriptor> axes)
|
||||
{
|
||||
base.GetInputAxes(axes);
|
||||
}
|
||||
|
||||
protected override CinemachineVirtualCameraBase ChooseCurrentCamera(Vector3 worldUp, float deltaTime)
|
||||
{
|
||||
return (CinemachineVirtualCameraBase)LiveChild;
|
||||
}
|
||||
}
|
||||
2
Assets/02_Scripts/Player/Camera/GeneralCameraRig.cs.meta
Normal file
2
Assets/02_Scripts/Player/Camera/GeneralCameraRig.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c04f8894370aab408215d8c6d9bfa1a
|
||||
Reference in New Issue
Block a user