Kantan Doc Gen - Auto generate UE4 reference documentation for Blueprints/reflected C++

I made this tool a while back, mostly for my marketplace plugins. Finally got around to tidying it up a little. I figured it may be useful to anyone who needs to share Blueprints or plugins they’ve created with others.

Essentially, it scans for functions and pulls core info like name and parameters, along with any Blueprint description/C++ comment you’ve added. Then compiles them into a folder of simple, navigable html pages.

The packaged plugin is available here.

Download links are at the top. If anyone needs pre-4.15, just ask.
Then just unzip it somewhere inside [UE4Install]/Engine/Plugins. I chose not to set it as enabled by default as that can get annoying when working in teams, so you’ll need to enable it from the Plugins tab and then restart, the first time you use it in a project. Once you’ve done that, it should show up on the File menu.

If anyone runs into any problems, please let me know. I haven’t really tested it outside of the couple of marketplace projects I use it for.
And if anyone feels like contributing improvements to the generated html formatting, please get in touch. I have no experience in that area, and just threw together something that looked vaguely like the UE4 docs.

2 Likes

This is pretty awesome! :slight_smile:

Nice, I’ll give it a try; I tried Doxygen, but the results were terrible.

This is excellent, nice work.

I see somewhere a message of “Dog Gen complete” instead of “Doc Gen complete”.
Comments not added to the generated docs page :confused:

Thanks for the feedback guys.

Haha. I must have clicked on that 100 times and I never noticed. Will fix!

So the plugin doesn’t directly scan C++ code, it uses the data stored by UHT. So if you’re getting a page generated for a function, but without your comment, that probably means UHT isn’t picking it up due to the formatting. I put a formatting example on the Github page. You can check if UHT caught your comment by placing the function node inside a blueprint and then hovering the mouse over it - it should show the comment as a tooltip.
If you still have an issue, PM your comment + function declaration and the generated HTML, and I’ll take a look.

Ah nevermind; I was using triples slashes that’s why comment didn’t show with params included.

Just saw this, nice work! Why it is not in marketplace?

Thanks a ton for the plugin. Just want to chime in that I did see in a livestream once if I remember correctly that Epic does ise Doxygen but they modified it so it can handle the UE4 macros.

Thanks. Simply put, because my experiences with the marketplace do not make me eager to submit another free plugin there. Also I can’t commit to support - I intend to keep it updated, but it’s on Github and people can use it as they like. I don’t have the time to clean up the code, provide proper documentation, etc.

Yeah, and from what I understand, those modifications complicate the license situation, meaning they can’t release that code with the engine source. Anyway, the nice thing about doing it this way is that by piggy-backing on the reflection system, the plugin can document both (reflected) C++ and Blueprint functions by exactly the same process. Hopefully, Epic will add the option to enter function parameter descriptions in Blueprint - if they do, the plugin will include those without needing any modifications to its code.

Hello kamrann, thankyou for this useful and amazing tool!

I have a question: is there a way to include also Blueprint CustomEvents into the docs?

I have a lot of stuff being done on CEs instead of Functions (because of the replication system), so would be awesome to document those as well!

I tried to comment the CustomEvent using the comment block AND the single-node comment bubble, but e none will export to the Docs.

&stc=1

Could you provide a couple more examples of what goes in your configuration values? I am not having any luck. My DocGen folder remains steadfastly empty.

It looks like a really useful tool, and I am looking forward to using it.

Regards,

Giffen

Currently it doesn’t support events, which I agree would be useful to have. I’ll take a look at the possibility, but I’m rather busy at the moment so unless it’s an easy fix I can’t say for sure when it would be added.

To clarify, for blueprint functions, the tool uses the ‘Description’ field (shown in the details panel when you select the function), not blueprint comments. Generally it doesn’t make sense to try to grab node comments, since the tool is documenting available functions, not specific instances of functions being called. Unfortunately it seems the description field doesn’t exist for custom events, but I’ll see if I can at least get the event to show up in the docs as a first step.

Do you get anything printed in the output window when you run it? It could definitely stand to have some more complete error logging, but it’s worth checking.
There are tooltips if you hover over the elements in the config dialog. For blueprints, it currently uses content paths rather than raw folder paths. So to include blueprints in, for example, “Content/Blueprints/MySubfolder”, you’d add an entry of “/Game/Blueprints/MySubfolder” (without the quotes). ‘/Game’ is used by UE4 as the path to the root content directory of a project. I’ll add a folder picker in the next version to simplify this.

If you still have problems, send me an image of you config, along with the log output if there is anything in there of relevance.

Just uploaded 4.16 version and also updated 4.15.

  • Will now pick up custom events, but since there is no ‘Description’ field available, it can only document the function name and parameters, no comments.
  • Simpler way to specify paths for blueprint documentation using content browser path picker.
  • Saves settings on a per-project basis.
  • Improved output (log and notifications) on failure.

Nice! Ty ty very much

Hi!

This is very cool. I appreciate the time-saver. I was just wondering: is it possible to also document the C++ functions that aren’t exported to blueprints? I put the same kind of comments above those functions as well and they are a part of my API. Oh, also there are comments above the class declarations that could be put in the doc pages with the member lists.

Thanks again and cheers,

Hi .

It is built entirely on top of the UE4 reflection system, so it can’t do anything with non-reflected methods or types. In theory it should be able to document any UFUNCTION, not just blueprint-exposed ones. So I guess if you wanted, you could just add a bare UFUNCTION() macro above any methods you wanted documenting. I think doing that would add a very minimal overhead in terms of code size and memory usage, but in practical terms it should be irrelevant. If you try it and they fail to document just let me know, I may just need to adjust some filtering settings.

I don’t recall if the reflection system picks up comments above classes. If it does, it should be something I can add easily next time I make an update.

The plugin is still under development?

I can’t speak for the auth but I would imagine it is? I see it has 4.18 support and I know there was some talk about 4.19 being buggy or something so I think some people skipped that version to avoid problems. After 4.20 is out for a couple weeks check back and see. I am going to keep an eye on this as well because I am interested in it also.