#if HAVE_USEQUENCER using System; using UnityEngine; using WellFired; namespace Framework.Camera { /// Displays a camera targeting event in the uSequencer timeline [CustomUSEditor(typeof(USTargetCameraEvent))] public class USTargetCameraEventEditor : USEventBaseEditor { /// Renders the event in the uSequencer timeline /// Area covered by the event /// The rectangle the event has covered public override Rect RenderEvent(Rect myArea) { USTargetCameraEvent cameraEvent = TargetEvent as USTargetCameraEvent; if(cameraEvent == null) { Debug.LogWarning( "Trying to render an event as a USTargetCameraEvent, but it is a: " + TargetEvent.GetType().ToString() ); } DrawDefaultBox(myArea); GUILayout.BeginArea(myArea); if(cameraEvent != null) { GUILayout.Label("Target Camera", DefaultLabel); if(cameraEvent.Target == null) { GUILayout.Label("Nothing", DefaultLabel); } else { GUILayout.Label(cameraEvent.Target.name, DefaultLabel); } } GUILayout.EndArea(); return myArea; } } } // namespace Framework.Camera #endif // HAVE_USEQUENCER