using Sandbox.Internal; namespace Sandbox { [AttributeUsage( AttributeTargets.Class )] public class LibraryAttribute : System.Attribute, ITitleProvider, IDescriptionProvider, IClassNameProvider, IUninheritable { string Internal.ITitleProvider.Value => Title; string Internal.IDescriptionProvider.Value => Description; string Internal.IClassNameProvider.Value => Name; /// /// This is the name that will be used to create this class. /// If you don't set it via the attribute constructor it will be set /// to the name of the class it's attached to /// public string Name { get; internal set; } /// /// The full class name /// public string FullName { get; internal set; } /// /// A nice presentable name to show /// public string Title { get; set; } /// /// We use this to provide a nice description in the editor /// public string Description { get; set; } /// /// We use this to organize groups of entities in the editor /// public string Group { get; set; } /// /// We use this to filter entities to show in the entity list in the editor /// public bool Editable { get; set; } public LibraryAttribute() { } public LibraryAttribute( string name ) { Name = name; } } }