Search Unity

XML comments for UnityEngine/Editor DLL

Discussion in 'Documentation' started by Demigiant, Jul 31, 2014.

  1. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I think it's truly time for the UnityEngine and UnityEditor DLL to be published with complete XML documentation, so that IntelliSense can give you full infos instead than showing methods and properties that have no description at all.
     
  2. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Would be good indeed.
     
  3. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Agree. And I really hope we will have this soon-ish. Haven't looked into the actual details of implementing it though
     
  4. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Someone's already doing it. Can't remember exactly who though.
     
  5. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Glad to hear that!
     
  6. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Good to know :) You mean who could implement it? The details otherwise are pretty simple: you just need to write correct XML comments above each method/property then tell your editor to also export the XML documentation when compiling the library.
     
  7. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Yeah, sounds easy I know, but we don't have the documentation inside the C# files for e.g. following reasons:
    1. Allow easy translation into other (human) languages
    2. Our C# files is to large extend an auto-generated layer on top of the C++ core, which increases the maintanability overall

    But yes, I also miss the intellisense tooltips when working with Unity myself.

    Haven't taken a closer look, but the uIntelliSense asset store package claims to have implemented this: https://www.assetstore.unity3d.com/en/#!/content/22906

    Rasmus
     
  8. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Ouch, I totally understand now. Cool about uIntelliSense by the way, will check it out.
     
  9. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
    I wrote a tool to parse the html docs and convert them into XML files to enable intellisense code hints. The same thing as what uIntellisense does but I am providing the XML files for free. This should work well enough until Unity gets around to providing official support for it.

    https://github.com/drostar/UnityIntelliSenseDocumentation
     
  10. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Thanks @mdrotar, works here on my Unity 4.6 on Mac as well!

    FYI, the process of installing on Mac/MonoDevelop is:
    Copy your XML files to /Applications/Unity/Contents/Frameworks/Managed and /Applications/Unity/Contents/UnityExtensions/Unity/GUISystem/4.6.0

    Should be fairly easy to implement now (we already have the documentation internally in XML files), and would think it should be possible to get into Unity 5.x soon. Your XML files will be valuable for 4.6 anyways, so thanks again.

    Best regards, Rasmus
     
    Last edited: Jan 25, 2015
    unity-nikkolai likes this.