Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
157 stars 26 forks source link

Put "Attribute" classes in a separate section #130

Open lufinkey opened 1 year ago

lufinkey commented 1 year ago

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

Doraku commented 1 year ago

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.

lufinkey commented 1 year ago

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