Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put "Attribute" classes in a separate section #130

Open
lufinkey opened this issue Sep 19, 2022 · 2 comments
Open

Put "Attribute" classes in a separate section #130

lufinkey opened this issue Sep 19, 2022 · 2 comments

Comments

@lufinkey
Copy link

lufinkey commented Sep 19, 2022

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
Copy link
Owner

Doraku commented Sep 20, 2022

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants