DefaultDocumentation icon indicating copy to clipboard operation
DefaultDocumentation copied to clipboard

Put "Attribute" classes in a separate section

Open lufinkey opened this issue 2 years ago • 2 comments

I have several classes in my unity project that inherit from UnityEngine.PropertyAttribute. Is there a way to put these in a separate section from the "Classes" section? Basically I just want to have an Attributes section that only include classes that inherit from UnityEngine.PropertyAttribute or System.Attribute

lufinkey avatar Sep 19 '22 22:09 lufinkey

you should be able to do that by creating your own plugin. In there you would need to create a new version of the https://github.com/Doraku/DefaultDocumentation/blob/master/source/DefaultDocumentation.Markdown/Sections/ChildrenSection.cs#L288 ClassesSection by overriding GetChildren to filter out type that inherit PropertyAttribute or Attribute. You could then create a new section type with a new name to do the opposite and add it to the sections to render for your project. Check the plugins documentation for more info, feel free to ask if you need more infos.

Doraku avatar Sep 20 '22 11:09 Doraku

Thanks, I'll check out the plugins API when I have some time

lufinkey avatar Sep 20 '22 16:09 lufinkey