Search Unity

Visual Studio 2017: How to show "System" and c# related documents other than "UnityEngine"?

Discussion in 'Scripting' started by cdytoby, Apr 28, 2017.

  1. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    Example:

    In Visual Studio 2017, Unity Project, when I move my mouse hover on the class name "MonoBehaviour", it will show the documentation "Monobehaviour is the base class from..."

    But in Unity Project, I don't have those documentation for c# standard classes. for example, when I hover my mouse on "string", it shows no document.

    But in non-Unity Project, in WPF project for example, there will be documentation like "Represents text as a sequence of..."

    How to solve that? How to enable c# standard class documentation in Unity?
     
  2. laxbrookes

    laxbrookes

    Joined:
    Jan 9, 2015
    Posts:
    235
    Provided you have
    Code (csharp):
    1.  
    2. using system;
    3.  
    You should be fine. If I understand rightly, you are referring to the summary of Unity members.
     
  3. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    I don't mean that I have compiler error, I mean I don't have C# document that I should have.

    Here are the screenshots.

    This is non-Unity project documentation for File class (documentation language is chinese.)
    devenv_2017-04-28_12-02-58.png

    This is Unity project "documentation" for File class, there are no documentation at all.
    devenv_2017-04-28_12-05-15.png

    How to enable the documentation for c# standard codes?
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    I believe that information is embedded in the xml files of the same name next to the dll.

    So if you right click UntiyEngine in your solution explorer's References, and check the path, you'll find that it's placed in:
    Path_to_game\Library\UnityAssemblies\UnityEngine.dll

    Next to UnityEngine.dll, there will be a UnityEngine.xml file with all of the docs.

    For the System.dll, there's no such xml file. For me, it's placed in:
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Unity Subset v3.5

    I'm not sure where you'd get access to the doc files.
     
  5. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    Thank you, after copy those related xmls from 3.5 Profile Client to Unity Subset v3.5, they showed up!

    Problem solved. But if there are better solution, please post it.
     
    makeshiftwings likes this.