Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Make Unity's internal DocFX setup public

Discussion in 'Package Manager' started by CaseyHofland, May 26, 2021.

  1. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    552
    I love to divide my code up into packages, and I would love if I could easily generate Unity-themed documentation for it (by which I mean pages like this).

    Currently I use github wiki for my manual and doxygen for my API, but dream of the day where I can just put my .md files in a Documentation~ folder, click a button, and everything would just... work, and have pretty styling to booth.

    Please make this public: I'd like to figure out how to integrate it with github pages. That way documentation becomes easy, more people may do it, and we'll all live happily ever after.
     
    Last edited: May 29, 2021
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,051
    DocFX is public, it's part of dotnet and not developed by Unity, you can find it here: https://dotnet.github.io/docfx/

    I've been using it to generate documentation like these for a long time and you can find the setup for it here. Though, it's not one-click and requires setup and tweaking.

    I would also appreciate an easier integration into the Unity editor and I believe Unity has an internal package that they might make public one day. But you'll always have to publish your documentation somewhere, DocFX documentation doesn't work with a
    file://
    url, so there's a limit to how much Unity can make the process transparent.
     
    mrwellmann likes this.
  3. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    552
    Ah yes, this internal package is what I meant, though I have worded it rather poorly.

    Even if it can't be run from
    file://
    , if we can get our hands on that package I could start exploring how to make it work with github pages.

    I have updated the title and my original comment to reflect these clarifications.

    And thanks for your example! If I understand correctly, you are using the trimmer-extras repository as a "wrapper" of sorts for either DocFxForUnity or your own implementation, correct? That's pretty clever, wish I'd thought of it.
     
    Last edited: May 29, 2021
  4. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,051
    AFAIK Unity is planning to add better package authoring tools, which could include ways to generate documentation. But with the current focus being on stability, I wouldn't expect them to become available very soon.

    I've set up this project before Unity's support for packages in git subfolders and, at the time, the only option to have a development Unity project and a git Unity package was to have two repositories. But I quite like the approach, it keeps the package repository focused and allows to put additional tangential stuff (documentation sources, tests and icon sources in this case) in the development project repository.
     
    CaseyHofland likes this.
  5. ExodusOTH

    ExodusOTH

    Joined:
    Nov 30, 2017
    Posts:
    44
    I'd love for their DocFx template to be public as well, so just a subtle bump from me
     
  6. frarees

    frarees

    Joined:
    Jun 8, 2012
    Posts:
    29