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.
///
///
///
///
[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;
}
}
}