using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; namespace Cinemachine.Timeline { internal sealed class CinemachineShotPlayable : PlayableBehaviour { public CinemachineVirtualCameraBase VirtualCamera; } public sealed class CinemachineShot : PlayableAsset, IPropertyPreview { public ExposedReference VirtualCamera; public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { var playable = ScriptPlayable.Create(graph); playable.GetBehaviour().VirtualCamera = VirtualCamera.Resolve(graph.GetResolver()); return playable; } // IPropertyPreview implementation public void GatherProperties(PlayableDirector director, IPropertyCollector driver) { driver.AddFromName("m_LocalPosition.x"); driver.AddFromName("m_LocalPosition.y"); driver.AddFromName("m_LocalPosition.z"); driver.AddFromName("m_LocalRotation.x"); driver.AddFromName("m_LocalRotation.y"); driver.AddFromName("m_LocalRotation.z"); driver.AddFromName("field of view"); driver.AddFromName("near clip plane"); driver.AddFromName("far clip plane"); } } }