IntelliSense Code Hints, XML Documentation for Unity API (like uIntelliSense) [FREE]

I created my own parser tool to parse the HTML ScriptReference documentation and convert it to XML documentation files that can be used to enable code hints and API documentation right inside Visual Studio and MonoDevelop as you type. Basically the same as uIntelliSense, but I want to give out the XML documentation files to everyone for free.

Here is the github repo with the XML doc files generated for Unity 4.6 and usage instructions: GitHub - drostar/UnityIntelliSenseDocumentation: XML Documentation that enables Intellisense code hints for the Unity game engine libraries.

It may still need some tweaks so if I get some feedback on particular issues, I’ll see if I can get it to do a better job of parsing to doc files. One thing I will look into a bit further is how many paragraphs of each description to add. Right now it just grabs the first paragraph to keep it short but sometimes that cuts off helpful information. And in some cases the Unity documentation in their HTML files is not so helpful (ex, GetComponent<>()’s description is just “Generic version”).

Probably not too useful to people who have already bought uIntelliSense, but hopefully the rest of you will enjoy it!

1 Like

Hi,
uIntelliSense developer here. Your generated XML files are quite good, actually! And that’d probably be enough for a lot of people. But just to avoid confusion on what is the difference between this and uIntelliSense:

  • uIntelliSense actually generates specific documentation from the version of Unity you use, so it is always relevant and up-to-date, even supporting Unity 5 already.
  • uIntelliSense extracts maximum possible information, and this not only means just text paragraphs, but also “See also” sections, exceptions etc.
  • uIntelliSense uses a ton of heuristics to workaround common Unity documentation issues like broken links, incorrectly formatted text, missing namespaces, unhelpful descriptions etc.
  • uIntelliSense does everything automatically in a single click. It also takes care of UnityVS (aka Visual Studio Tools for Unity), which sometimes tends to regenerate the XML docs in “Library/UnityAssemblies” folder.
  • And, most importantly, uIntelliSense is not just about IntelliSense hints. It also includes an extension for Visual Studio users that has multiple workflow-related features like a in-IDE scripting reference window, in-IDE scripting reference search and more, basically reducing the need to ever open scripting reference in your browser ever again.

It’s good to see uIntelliSense provides additional value above and beyond just intellisense code hints. I didn’t want to spend a lot of time on this because Visual Studio Tools for Unity and Unity themselves keep suggesting they will be providing XML docs some time Soon™.

My goal was to have accurate and reliable IntelliSense code hints showing up while coding. Things like seealso and see cref aren’t clickable in the popup Visual Studio provides while typing so I didn’t bother putting much effort into those. The most important for me is a description of the particular method/overload and a description of each parameter (including generic type parameters) with hints like “this parameter is in degrees” or “returns -1 if not found”. If I’m in the mood to click links to related topics, it’s just as easy for me to hit a key combo to have the HTML script reference pop up (UnityVS feature).

Exceptions would be something I’d like to do too but there doesn’t seem to be a reliable way to get that information from the HTML documentation. For example, UnityEngine.Sprite.textureRect has only a description that says “Get the rectangle this sprite uses on its texture. Raises an exception if this sprite is tightly packed in an atlas.” which doesn’t say what type of exception it raises. You’d have to either create a bunch of special cases (nightmare for maintenance and reliability) or actually disassemble the methods and check to see if they throw any exception (more work than I’m willing to do). Some member descriptions do mention the Exception type but I didn’t want to provide inconsistent support for that. The information that is available still shows up in the summary chunk at least.

Update

  • The doc files now include more information (all description paragraphs instead of just the first).
  • Added Windows batch script and Mac shell script to copy the doc files into the appropriate folders.
  • Added Unity Editor script to copy the doc files into the appropriate UnityVS folders.

https://github.com/drostar/UnityIntelliSenseDocumentation

1 Like

Update

  • Added Unity 5.0 documents.

https://github.com/drostar/UnityIntelliSenseDocumentation

1 Like

Hi,

This looks awesome. I have only have had a quick look so far, but it looks better than Hydrogen’s documentation. I am trying it out now.

Thanks.

thx very much man , i’m been a programmingr in standard c# + visual studio for 2 years. Now i’m beginning with unity and for me the intellisense API reference in Visual Studio was a must have .

very clear instructions in the gitHub document, easy to get it working.

Sorry for my english, not my main language.

PD: uIntellisense looks great too but is 10$ and there is no trial out there:face_with_spiral_eyes:, to try how good is compared to “this free version”.

1 Like

Just PM me, we’ll work something out :wink: