#if !UNITY_2019_1_OR_NEWER #define CINEMACHINE_TIMELINE #endif #if CINEMACHINE_TIMELINE using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; using Cinemachine; //namespace Cinemachine.Timeline //{ /// /// Internal use only. Not part of the public API. /// public sealed class CinemachineShot : PlayableAsset, IPropertyPreview { /// The name to display on the track #if !UNITY_2019_2_OR_NEWER [HideInInspector] #endif public string DisplayName; /// The virtual camera to activate public ExposedReference VirtualCamera; /// PlayableAsset implementation /// /// /// 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("m_LocalRotation.w"); driver.AddFromName("field of view"); driver.AddFromName("near clip plane"); driver.AddFromName("far clip plane"); } } //} #endif