Search Unity

How Doc Fx select the scripts documented in the script API

Discussion in 'Documentation' started by Rafzaell, Mar 3, 2022.

  1. Rafzaell

    Rafzaell

    Joined:
    Jan 4, 2022
    Posts:
    1
    Hello devs and creators,

    I'm developping a unity package and am using docfx to document it.
    It works great and is very useful but something seems still weird to me.

    I have added the documentation folder in my project folder as suggested, I get my package in the packages folder of my project and all seems to work.

    But, if I generate the doc (by using the command 'cp README.md Documentation/index.md' and 'docfx Documentation/docfx.json --serve'), the generated scripting API contains only the classes used by the scripts in assets/scripts. I would prefer to get every classes from the scripts contained in my package to be documented in the scripting API.

    Do I have to add every scripts I want to be documented in the asset/script folder?

    - If yes, how to get rid of warnings about conflicts, for example if I add some of my scripts that are in runtime /scripts to the asset foler (E.G Utilities.cs) and use it from another script (E.G AdvancedTrigger.cs) I get this warning:

    Assets\Scripts\AdvancedTrigger.cs(310,17): warning CS0436: The type 'Util' in 'C:\Users\Raphael\Documents\GitHub\Madtrix_tools\Assets/Scripts/Utilities.cs' conflicts with the imported type 'Util' in 'com.madtrix.madtrixtools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'C:\Users\Raphael\Documents\GitHub\Madtrix_tools\Assets/Scripts/Utilities.cs'.

    - If not, what is the good way to document every scripts in my package witheout adding those to the asset/script folder?

    Maybe this is something obvious for some of you but even after reading a lot about docfx and packages this makes me a bit confused still, so thank you by adavance for your answers.
     
  2. Xiaoye_Dark

    Xiaoye_Dark

    Joined:
    Oct 26, 2020
    Posts:
    1
    bro have you done this problem?