From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../Editor/Utilities/CustomTrackDrawerAttribute.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs') diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs new file mode 100644 index 0000000..021a635 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs @@ -0,0 +1,47 @@ +using System; + +namespace UnityEditor.Timeline +{ + // Tells a custom [[TrackDrawer]] which [[TrackAsset]] it's a drawer for. + sealed class CustomTrackDrawerAttribute : Attribute + { + public Type assetType; + public CustomTrackDrawerAttribute(Type type) + { + assetType = type; + } + } + + /// + /// Attribute that specifies a class as an editor for an extended Timeline type. + /// + /// + /// Use this attribute on a class that extends ClipEditor, TrackEditor, or MarkerEditor to specify either the PlayableAsset, Marker, or TrackAsset derived classes for associated customization. + /// + /// + /// [CustomTimelineEditor(typeof(LightControlClip))] + /// class LightControlClipEditor : ClipEditor + /// { + /// } + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + public sealed class CustomTimelineEditorAttribute : Attribute + { + /// + /// The type that that this editor applies to. + /// + public Type classToEdit { get; private set; } + + /// + /// Constructor. + /// + /// The type that that this editor applies to. + /// Thrown if type is null + public CustomTimelineEditorAttribute(Type type) + { + if (type == null) + throw new System.ArgumentNullException(nameof(type)); + classToEdit = type; + } + } +} -- cgit v1.2.3