Search Unity

uIntelliSense — Unity API Assistant

Discussion in 'Assets and Asset Store' started by ZimM, Oct 27, 2014.

  1. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Some progress with "quick view" window:
    2014-12-13_02-22-39.png
    It is a regular Visual Studio tool window, which means it can be convenietly docked anywhere you need. Clicking a link inside the window opens it inside the window, and clicking a link while holding Alt opens link on the default browser. I believe that should cover most use cases.

    Any thoughts on this and how this can be improved further, anyone? :)
     
  2. zee_ola05

    zee_ola05

    Joined:
    Feb 2, 2014
    Posts:
    166
    What about mac users? :\
     
  3. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Not everything at once. An extension for MonoDevelop would be a totally different thing because the API is very different and quite limited compared to what is available with Visual Studio. It'd practically be two different plugins, and if I start developing both of them in the same time I'll probably just end up wasting a lot of time trying to keep them in sync.
    That's why I'll finish the Visual Studio extension first, then proceed to the MonoDevelop version.
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Probably a lot of people won't finish scrolling down to read all the description on the Asset Store page (I know that's the case with our plugins from some questions we get emailed with). I think you might consider just changing the name to "uIntellisense for C#" to make it abundantly clear.
     
  5. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Fair point, thanks. I've now put the UnityScript notice to the very beginning of the description, that'd probably be clear enough.
     
  6. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds good. We enjoy your plugin, keep up the great work!
     
  7. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    Hey there, was just wondering if your plugin supports shader programming intellisense? (I use UnityVS which currently doesn't seem to support it) [EDIT: I missed the latest version update which states that uvs now supports shader http://unityvs.com/documentation/changelog/- still interested in knowing if your plugin support shaders]
     
    Last edited: Dec 20, 2014
  8. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    uIntelliSense only supports C# at the moment, nothing shader-related. This is, however, a really nice idea for future... Also, to be clear, it seems like UnityVS only provides syntax highlighting, which is unrelated to IntelliSense.
     
  9. Free286

    Free286

    Joined:
    Oct 29, 2013
    Posts:
    23
    currently working in unity 5 beta 14, ran the plugin and no problems, really great work! will recommend to everyone in my company.
     
  10. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Thanks a lot! :) Just FYI, for Unity 5 I only test on the latest beta (which is beta 18 at the moment), so there is a chance that it won't work with beta 14 after some update.
     
  11. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    How do you uninstall uIntellisense files that are created?
     
  12. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Just delete these files:
    <unity installation directory>\Data\Managed\UnityEditor.xml
    <unity installation directory>\Editor_4.6.1\Data\Managed\UnityEngine.xml


    For Unity 4.6, you also have to delete these files:
    <unity installation directory>\Editor_4.6.1\Data\UnityExtensions\Unity\GUISystem\4.6.1\Editor\UnityEditor.UI.xml
    <unity installation directory>\Editor_4.6.1\Data\UnityExtensions\Unity\GUISystem\4.6.1\UnityEngine.UI.xml


    But I'm just curious, why'd you want to uninstall them?
     
  13. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    I want to see the difference with what it does and what the UnityVS 2.0 beta does with 2015 which is suppose to include similar functionality. Been running it for a bit and got used to it (like it a lot) but if UnityVS can do it as well, I would prefer fewer moving parts.
     
  14. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    I really doubt that I suspect 80% of unity devs will be using MD if not more. Many are scared of VS thinking it is a lot more complex, many don't even know it exists, many don't know it is free now, and many just use MD as it is already included. Then you have lots that are just on OSX and it isn't even an option.
     
  15. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    I doubt those people have any plans on buying assets though.
     
  16. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Well, AFAIK, VSTU 2.0 is at the moment incapable of generating XML documentation because of a bug - it always generates empty files.
    Sure, large % of Windows people will still use MonoDevelop, but now, as VS became free, this may change over time, as obviously, there's no real reason not to use VS if you can - it beats MonoDevelop in everything.
     
  17. Wompipomp

    Wompipomp

    Joined:
    Aug 31, 2014
    Posts:
    24
    Hi,

    I am using VS 2013 and VSTU.
    Really looking forward to your next release with the quick view window. It looks really good. Many times I end up reading the short documentation and still have problems understanding what the function does or a specific parameter.

    Some ideas for the future:
    If not already implemented in VS, a shortcut to search on unity.com (like in MonoDevelop I think Strg + '). Or maybe even a shortcut to quickly search on google about the function or class.
    Also maybe some kind of templates / snippets specifically for unity or even some functionality from Resharper. Not everybody can afford buying Resharper at home especially when playing around with unity in your free time and just for fun. :)

    Best regards
    Mark
     
  18. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    @Wompipomp
    You're just in time, the massive 1.2.0 update just went live on Asset Store! :) And some ideas you've mentioned are already there.

    Changelog:
    • Major parsing improvements. Much more data is now retrieved.
    • Added Visual Studio extension with various documentation-related features.
    • Added <exception> and <seealso> elements support in XML documentation data.
    • Improved <see> element handling.
    • Added an option to uninstall uIntelliSense data.
    • Improved compatibility with User Access Control on Windows.
    • UI improvements.
    • Major internal code improvements for better operation.
    One example of documentation processing improvements:

    upload_2015-1-18_1-37-47.png

    And a quick overview of the new features... (Click the spoiler below)
    Quick View tool window
    Quick View tool window allows you to explore Scripting Reference without leaving Visual Studio. It is a regular Visual Studio window, so it can be dragged around and compactly docked anywhere you want.

    upload_2015-1-18_1-3-42.png
    Holding the Shift key while clicking a link will open it in your default browser.

    Arrow keys in upper right corner of the window are used to navigate the browsing history. You can also use Backspace and Shift+Backspace keys for the same purpose.

    The common way of using the Quick View window is to place your cursor over some code symbol, open the context menu by right-clicking, and then click “Open In Scripting Reference”.
    upload_2015-1-18_1-4-15.png
    You can also use Ctrl+’ (single quotation mark) shortcut to execute this command without using the context menu.

    Quick Launch search

    uIntelliSense Visual Studio extension adds Scripting Reference capabilities to the Quick Search field, located at the upper right corner of Visual Studio.

    upload_2015-1-18_1-5-34.png
    The search is smart enough to understand parts of words. For example, if you type "mat ort", the first result would be UnityEngine.Matrix4x4.Ortho.

    Clicking on a search result will open it in the Quick View window. Clicking while holding Shift key will open the result in your default browser.

    You can use Ctrl+Q shortcut to quickly focus on the Quick Search and start typing right away.

    Unity message method icons

    The extension can also add icons to the code editor, that show if the method is actually implementing a Unity message method like Start, Update, OnCollisionEnter etc. This is useful to visually separate these methods from regular ones, as they are not actually overrides of any base class methods, and that can be confusing sometimes.

    upload_2015-1-18_1-6-49.png

    I've really put a lot of time in this update, and I hope Visual Studio users will benefit a lot from this extension :)
     
    Last edited: Jan 17, 2015
  19. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    Looks really cool, indeed ! Great job, man :)
     
  20. Wompipomp

    Wompipomp

    Joined:
    Aug 31, 2014
    Posts:
    24
    Great update, looks really cool.:)

    Thank you.
     
  21. Robutmike

    Robutmike

    Joined:
    Nov 25, 2013
    Posts:
    4
    Does this not work with Visual Studio Express 2013? I cannot seem to get it to install the extension:

    The installer seems to find it, but the end of the log says:

    1/19/2015 7:06:51 PM - Searching for applicable products...
    1/19/2015 7:06:51 PM - Found installed product - Microsoft Visual Studio Express 2013 for Windows Desktop
    1/19/2015 7:06:51 PM - Found installed product - Global Location
    1/19/2015 7:06:51 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
    at VSIXInstaller.App.InitializeInstall()
    at System.Threading.Tasks.Task.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()
     
  22. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Yes, extensions are not supported by any Express editions of Visual Studio. But in case you don't know, there is no need to use Express anymore! Some time ago, Microsoft has released Visual Studio 2013 Community Edition, which is free and functionally equivalent to Professional:
    http://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
    Extensions work fine on Community edition as well. I'm using it personally and it's great, there's really no reason left to use Express these days.
    P.S. This is only needed to install the optional Visual Studio extension, basic IntelliSense would work just fine even on Express.
     
    Last edited: Jan 20, 2015
  23. Robutmike

    Robutmike

    Joined:
    Nov 25, 2013
    Posts:
    4
    Thanks for the tip! Much appreciated!
     
  24. radazen

    radazen

    Joined:
    Feb 29, 2012
    Posts:
    13
    Any idea how to make this work with Visual Studio on OS X? MonoDevelop has been nothing but a headache for me, so I use Visual Studio on OS X with Parallels. It works great with Unity, but I can't seem to get uIntelliSense working. I've run uIntelliSense's API scanner from both OS X and Windows.

    If I launch VS2013 via Unity-for-Mac, it opens my project in VS2013 but doesn't recognize any Unity types (i.e. no uIntelliSense). If I launch VS2013 via Unity-for-Windows, it launches a separate instance of VS2013 where uIntelliSense works fine -- including the Visual Studio extension, which shows icons for Unity message methods as expected.

    I was hoping that doing the API scan in Windows would be enough, but launching VS2013 from Unity-for-Mac seems to have some sort of quirk that stops it from finding the correct API information...either in OS X or in Windows, since I've run uIntelliSense in both places.

    [EDIT]
    Seems to be a solution-level thing. It doesn't matter if I start the instance of VS2013 from OS X or Windows...it actually just depends on what solution file I have open. If it's my current project from OS X, I don't get references. If it's the dummy project I created in Windows, I do.
     
    Last edited: Jan 20, 2015
  25. Syrsly

    Syrsly

    Joined:
    Mar 2, 2013
    Posts:
    11
    Disregarding the recent price hike from $5 to $10, I am curious if there's any way to use this plug-in with Notepad++ or a similar lightweight code editor.
     
  26. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    That's a tough question since I can't really try doing that myself, so I'll have to make an educated guess. Basically, when loading a project, for each referenced assembly Visual Studio searches for .xml file right beside the assembly location (so if a referenced assembly is located at "C:\Program Filles\Unity\Data\Managed\UnityEngine.dll", VS will search the file "C:\Program Filles\Unity\Data\Managed\UnityEngine.xml") and tries to use it as documentation reference. Honestly, I have no idea how Parallels work, but this may be related to how paths to assembly references are generated. Try opening the project that is generated when you start Unity for Mac, and look at where UnityEngine assembly reference is loaded:
    upload_2015-1-21_15-56-31.png
    Is there a corresponding .xml file at that location? It'd also help if you PM me the .sln and .csproj files generated when running Unity for Mac and Unity for Windows, I'll compare them and probably have a better idea on what's going on here.
     
    Last edited: Jan 21, 2015
  27. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Just did a small research, and, apparently, you can.

    For Sublime Text, you'll have to install OmniSharp package and setup your project. After that, "OmniSharpSublime → Type Lookup (Alt+')" context menu item will open a panel with the documentation. Note that OmniSharp has an issue that it only shows documentation for type members, but not for the types itself. This isn't probably a major issue since most of the time you search descriptions for type members, but it's worth noting.
    A nice blog post with more information about OmniSharpSublime
    upload_2015-1-21_16-3-32.png

    Notepad++ also has a plugin for better C# support: CS-Script. Unfortunately, it's not very suitable for working with unity projects. This is because it doesn't understands solutions and projects that are generated by Unity, instead you have to edit one file at a time. Also, CS-Script can't find a reference to UnityEngine assembly, and you have to explicitly insert css_reference code directive into every .cs file that you edit to make it actually work. But otherwise - yes, IntelliSense hints work with CS-Script too.
    upload_2015-1-21_16-29-44.png

    And, obviously, the Visual Studio extension will only work in Visual Studio, everything else will only provide basic documentation hints.
     
    Last edited: Jan 21, 2015
    Muckel likes this.
  28. radazen

    radazen

    Joined:
    Feb 29, 2012
    Posts:
    13
    Ah hah. As it turns out, Visual Studio wasn't finding the UnityEngine DLL at all (the "Path" property mentioned in your post was actually empty). Not uIntelliSense's fault...once I fixed those paths, IntelliSense started working as expected. Thanks!
     
  29. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Does this not work with VS 2012 Pro?? I went to
    View → Other Windows → Unity Scripting Reference

    I do not see Unity Scripting reference at all.. Nor is this program doing anything, I see nothing when I type any thing... I ran the data. I also added the VS Extenstion I did a complete uninstall and reinstall.

    I see nothing... So wondering if there is an issue with Pro version of VS, as I bet 90% of everyone else has express the free version..
     
  30. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102

    Noone uses express anymore now that VS 2013 pro is free.
     
  31. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    I've personally tested it with VS 2012 and it worked for me, so it's probably not a problem of VS version.
    Do you mean you don't have that menu item at all even though you have installed the VS extension? Do you have the extension listed in "Tools → Extensions and Updates..."? If yes, do you have the settings panel "Tools → Options... uIntelliSense"?
    Do you have the description in the hint when you hover over any Unity API code element?
    What do you mean? uIntelliSense only adds text descriptions to code elements, it does not replaces the built-in IntelliSense feature of Visual Studio, which is the one actually providing code suggestions as you type.
     
  32. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Last edited: Jan 24, 2015
  33. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
  34. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Yes I have it installed and I do not see that menu item at all. With VS installed, I should see Unity scripting reference

    I do not see it, I now uninstalled 4 times nothing. I even did a fresh install of Unity 4.6, and VS to Unity, then the Add on, and then the extension same issue.



    uIntelliSense only adds text descriptions to code elements, it does not replaces the built-in IntelliSense feature of Visual Studio, which is the one actually providing code suggestions as you type.

    I know what it does, but there is nothing , no suggestions I only see the VB one, I see no difference, so confused to what is the point to this add on if I see no difference when VB or not.. By the PDF, I Should see more info..

    If I'm incorrect explain to me what this plug in does then as I see nothing. When I write code, in VS I normally see a definition , which is from VS or Mono.. I assume this was an extention to the current one, and added more or more defined information..

    So please explain to me the purpose of this, if I'm incorrect.

    Thanks

    Because either A this is not working or B, I do not understand this addon, which could be useless to me. I hope its not useless and its just not working. Thanks!
     
  35. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Developer of the tool helped me, thanks. Top notch support. Keep up the great work.. Found a bug, and he fixed it in about 10 mins. issue resolved.

    Thanks.!
     
  36. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    How long does it normally take for VS to create the documentation cache? I installed this asset and followed the installation steps. I was a bit unsure of what to do at certain points since I have VS Community 2013 and it says there is a 2010+ Extension to install so I wasn't sure if I had to build the documentation data before installing the VS extension or after or if I even had to at all. I ended up building the documentation data, then installing the VS extension.

    So far I get IntelliSense for methods coming up but it always says the documentation cache is still being built so I don't see any descriptions or anything. I've been working on my project for a few days now (maybe 6+ hours of having VS open). Is this normal or is something wrong?
     
  37. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    @Leuthil
    The extension is optional, it doesn't affects basic IntelliSense hints, so it is not related ... But yes, you have to install the data before you install the extension.

    There's definitely something wrong with documentation cache building. It takes 10 seconds at most with VS 2013 Community on my machine. AFAIK, situation like yours can mean one of two things:
    1) Something within VS is constantly hogging resources, and documentation cache is only built when VS is almost idle.
    2) The project became corrupted somehow.
    I'd suggest closing VS, deleting all the solution files in your project root: *.sln, *.csproj, *.suo (these are usually hidden) and reopening.
     
  38. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    @ZimM

    Hmm I figured. Ok I will give that a try and let you know my results. Thanks for the response.
     
  39. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    97
    Ok I think it worked now. It seems like it may have been because I installed the extension while my VS was opened. I deleted those files and it worked. Thanks for your help @ZimM :).
     
    Last edited: Jan 26, 2015
  40. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    Hey, ZimM,
    Earlier in this thread, someone asked about the "exception has been thrown by the object of this invocation" error. They replied that you had responded to them directly with a quick fix. Would it be possible to share that solution more broadly? I'm getting it in my installation as well. Thanks.
     
  41. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    BTW, I'm using VS 13 Community and the latest iteration of Unity 4 Pro. Thanks.
     
  42. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    The fixed version was published to the Asset Store for everyone the same day, so what you are facing is a different issue. What uIntelliSense version do you use? What OS do you use? Also, please provide the full exception stacktrace so I can investigate the issue.

    Thanks.
     
  43. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    Hey, all--
    I tried the standard "Unity-Universal-Asset-Fix" approach and it worked! If you've run into the "An exception has been thrown by the object of an invocation" error in VS, try the UUAF fix and it may work:

    1) Delete the asset in question (its folder and all related files (i.e., the main editor folder often has an asset's files as well)
    2) Remove uIntellisense from Visual Studio itself (VS13 - Menu - Tools - Extensions and Updates)
    3) Open a NEW SCENE! I often forget to do this, and it can cause problems.
    4) Close Unity (and Visual Studio)
    5) Open Unity, and re-download the asset (just in case your files missed an update and it's not showing)
    6) Install the asset
    7) (optional, but I'm superstitious) Close/Restart Unity again
    8) Install the VS Extension (the drop-down arrow in Unity's uIntellisense window, via Menu - Tools - Lost Polygon)
    9) Generate Intellisense Data (via the uIntellisense window)
    10) Close/Restart Unity again (and Visual Studio if it was open)
    11) Try loading a script and see what happens. You may have to wait a few seconds for the data to be generated in Visual Studio. Once it does, though, you should see pop-up hints just like you're supposed to.
     
  44. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    Thanks, ZimM. I'm using Windows 8.1, and the latest version of uIntellisense. I'm guessing it may have been related to my having installed uIntellisense while one of my script-heavy scenes was open.

    Also, I have a PlayMaker object in the scene as well. It's not actually doing anything; I just hadn't deleted it yet. But perhaps that could trigger the conflict.

    Regardless, thanks for responding so quickly!
     
  45. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Oh, you've never mentioned that you've got that exception from within Visual Studio. I thought you were talking about Unity part. Is "An exception has been thrown by the object of an invocation" the whole error text that you were getting? I'd appreciate more information on that. When exactly you were getting that error? That definitely was a bug in uIntelliSense, not a conflict of any kind. But, you know, I can't fix the bug that I don't have enough information about... At least it is mysteriously gone for you, so probably it was a rare issue after all.

    To be clear, VS extension is not mandatory, hints will work in VS without it installed. VS extension just adds additional features like in-IDE scripting reference window, quick search in scripting reference, icons for Unity message methods etc.
     
  46. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    1.3.0 update is now live on Asset Store!

    Changelog:
    • Improved documentation parsing and generation.
    • Improved UI of Visual Studio Extension.
    • Fixed some rare crashes in Visual Studio Extension.
    • Fixed Visual Studio Extension crashing when Internet Explorer 8 was used in the system.
    • Fixed a possible crash on Unity 4.5.
     
  47. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    I get the following while generating data:
    NullReferenceException: Object reference not set to an instance of an object
    LostPolygon.uIntelliSense.Internal.XmlDocsGenerator.AugmentXmlDocumentation (IEnumerable`1 memberInfos)
    LostPolygon.uIntelliSense.Internal.XmlDocsGenerator45.BuildXmlDocumentation ()
    UnityEngine.Debug:LogException(Exception)
    LostPolygon.uIntelliSense.Internal.XmlDocsGenerator45:BuildXmlDocumentation()
    LostPolygon.uIntelliSense.XmlDocsGeneratorWindow:BuildXmlDocumentation()
    LostPolygon.uIntelliSense.XmlDocsGeneratorWindow:Update()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
  48. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Thank you for reporting this. What OS and Unity version are you using?
     
  49. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    Windows 7 Ultimate, Unity 4.6.2.
     
  50. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    "Regular" 4.6.2 or some patch release? I've just tried with 4.6.2p1 and 4.6.2p2 and it worked fine for me. But I'm pretty sure it worked with 4.6.2 as well... Just a hunch - do you have "uIntelliSense\Editor\Resources\uintellisense-data.xml" file present?

    UPD: issue was solved by simply deleting the uIntelliSense folder and reimporting it again.
     
    Last edited: Feb 14, 2015