DocFxForUnity
DocFxForUnity copied to clipboard
Unity package layout is incompatible
EDIT: This is my old comment but after some testing I have already found the answer. For the real issue, read my next comment.
Right now it's more of a question than an issue, depending on the answer this might be an issue.
I am writing a Unity package and was hoping to generate documentation for it, however I understood from this issue that the .csproj file is needed for this to work (but I might be misreading it). Unity packages work with .asmdef files, but not .csproj files. Can it still be done?
If it IS compatible, then it might just be something in my configuration, but if it is I can't find out what. All I have modified so far is:
- .github/workflows/documentation.yml to use "Documentation~" directory instead of "Documentation" directory.
- Documentation~/filterConfig.yml for my main namespace.
- Documentation~/docfx.json src, globalMetaData and sitemap.
DocFX works great for me if my github is structured like a Unity project. However, I want to generate documentation for Unity packages, whose (preferred) layout can be found here.
Notably, this layout does not contain a .csproj or .sln file, only .asmdef files.
Ideally, I would like a solution. Regardless, I am interested in why DocFX doesn't work for Unity packages. Are the .csproj files the culprit, and if so can documentation be generated without them?
I'm also interested in this
For anyone who has gotten here, @CaseyHofland has made a GitHub action for the docfx documentation for Unity packages,
and the workflow worked for me. Kudos to @CaseyHofland! 🙌
https://github.com/CaseyHofland/docfx-unitypackage