Doraku / DefaultDocumentation

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

Put "Attribute" classes in a separate section #130

Closed lufinkey closed 1 month ago

lufinkey commented 2 years 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 2 years 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 2 years ago

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

Doraku commented 1 month ago

cleaning up old issues, feel free to reopen if you still need assistance.