DocFxForUnity icon indicating copy to clipboard operation
DocFxForUnity copied to clipboard

Unity package layout is incompatible

Open CaseyHofland opened this issue 3 years ago • 3 comments

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.

UIWitches.

CaseyHofland avatar May 24 '21 12:05 CaseyHofland

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?

CaseyHofland avatar May 24 '21 20:05 CaseyHofland

I'm also interested in this

thehen avatar Oct 23 '22 11:10 thehen

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

bohyunjung avatar Feb 20 '24 01:02 bohyunjung