Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
37
Question by AlexQ · Jul 05, 2011 at 05:50 AM · apivisualstudio

API help in Visual Studio?

Anybody know how to get the help of the Unity API in the Visual Studio IDE? Thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

8 Replies

· Add your reply
  • Sort: 
avatar image
88

Answer by Vurawid · Sep 30, 2015 at 03:33 AM

I realize this is an old question, but wanted to add some additional information for those that might benefit.

  • For those that don't have it, install Visual Studio. It's now free for many users.

  • Make sure Visual Studio Tools for Unity is installed and the configuration is done.

  • As djradon mentioned, the standard shortcut is CTRL+ALT+M,CTRL+H for Unity Documentation Access

If you want a simpler shortcut or even to make it the same as in MonoDevelop, you can do the following...

  1. Open Visual Studio

  2. Go to: Debug > Options and Settings > Environment > Keyboard

  3. Find command "Help.UnityAPIReference"

  4. Assign a new shortcut.
    For example: CTRL+ALT+'
    In MonoDevelop, the shortcuts are CTRL+' (Windows) or CMD+' (Mac)

Adding a Button to The Toolbar: With the tighter integration with Visual Studio mentioned in the Unity 5.2 release notes, it's fairly simple to add a button to the toolbar instead of using the shortcut keys. This may be possible in other versions, but I only decided to do this recently...

  1. Go to menu: View > Toolbars > Customize

  2. Click New

  3. Enter a name such as “API Reference”

  4. Click OK

  5. Go to Commands tab

  6. Select Toolbar

  7. Choose the new toolbar name in the dropdown

  8. Click Add Command

  9. Select the Help category

  10. Choose cmdIdUnityDocumentation

  11. Click OK

  12. There should now be a Unity API Reference button on the toolbar

Please see RedElijah's comment if you would also like to change the API Reference to open in an external browser instead of inside a Visual Studio tab.

Searching Offline Docs: By request, the below instructions provide a way to more easily search offline documentation. This uses external tools. Other options would be to build an add-in for Visual Studio (or MonoDevelop) or ask Unity to update the existing add-in.

  1. Open Visual Studio

  2. Go to the menu: Tools > External Tools

  3. Click the Add button

  4. Make note of how many external tools there are now (it will be needed later).

  5. Enter a Title:
    Unity API Offline Search

  6. Enter path to your desired browser as Command:
    C:\Program Files (x86)\Mozilla Firefox\firefox.exe

  7. Enter the URL below as Arguments:
    "file:///C:/Program Files/Unity/Editor/Data/Documentation/en/ScriptReference/30_search.html?q=$(CurText)”

  8. Leave empty: Initial Directory

  9. Leave unchecked: Prompt for arguments

  10. Click OK to save changes.

Replace "#" in the below two items with the number of external tools noted earlier.

  • To add to toolbar as a button... follow steps earlier above on how to add the API reference button, but instead of the command "cmdIdUnityDocumentation" choose "External Command #” under the Tools category.

  • To add a keyboard shortcut… go to Tools > Options > Environment: Keyboard and look for the command "Tools.ExternalCommand#”.

How To Use It?
Select the text you want to search then run the external tool with preferred method (toolbar button, shortcut key, or menu option).
Warning: The external tool runs as a command line argument. Avoid selecting quotes in search text as it will cause undesired behavior.

How To Setup In MonoDevelop?
It is in a slightly different menu location (mentioned below), but very similar to Visual Studio setup. I was unable to bind a key or create a button so you will need to run it from the menu option created.

  • Go to the menu: Tools > Options > Environment: External Tools

Comment
Add comment · Show 22 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GrahamH · Dec 05, 2014 at 02:29 PM 1
Share

@Vurawid

Thank you so much for taking the trouble to update this post. That's exactly what I was looking for.

avatar image jamesk5 · Jul 16, 2015 at 08:53 PM 2
Share

Thanks! Very helpful.

I used CTRL+SHIFT+ALT+H

avatar image RedElijah · Aug 04, 2015 at 03:44 AM 14
Share

Very useful, Vurawid - thank you.

I wanted to add that it's also possible to open Unity's API pages in an external browser (which will be familiar behavior if you used $$anonymous$$onoDevelop), rather than within one of Visual Studio's own tabs. This is particularly useful if you appreciate having a separate window or use a multi-monitor setup.

To do this, go to TOOLS > OPTIONS > TOOLS FOR UNITY > GENERAL > DOCU$$anonymous$$ENTATION > USE EXTERNAL BROWSER (set to TRUE).

avatar image W0RDZ · Oct 25, 2015 at 05:20 AM 0
Share

Thankyou so much!!! I've gone all day learning and watching the tutorial videos and I couldn't figure this out. Thank you!!!!

avatar image unixsystem · Nov 29, 2015 at 03:41 AM 0
Share

Super helpful! Thanks for taking the time to post!

Show more comments
avatar image
6

Answer by djradon · Dec 14, 2013 at 04:28 PM

In Visual Studio, ctrl+alt+m and then ctrl+h works for me.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KellyThomas · Dec 14, 2013 at 04:36 PM 0
Share

This works for me too, but I was unsure if this was added by unityVS or if it came standard.

On a side note, I find it easier to switch to a browser than to use a 3-key then 2-key keyboard sequence.

avatar image dav1dsm1th · Feb 03, 2015 at 04:14 AM 0
Share

Just added this to my custom toolbar (to avoid the odd "shortcut" or switching to browser). Thanks for the answer - it was bugging me that I couldn't get contextual help from within VS.

avatar image Michael-Polla · Mar 05, 2015 at 10:37 AM 0
Share

Hi ! This shortcut is added by Visual Studio Tools for Unity, so don't forget to install it first :-)

avatar image
0

Answer by CHPedersen · Jul 05, 2011 at 06:10 AM

I'm not totally sure what you mean by "get the help of the Unity API", so I'm going to take a best guess here. ;) Do you mean how to get Intellisense (Autocompletion) to expose the variables, properties, classes and methods available when you include the Unity namespaces? (UnityEngine, UnityEditor, etc)

If so, then the answer is that you need to set up Visual Studio as the IDE for Unity. You do this in Edit->Preferences->General tab->External Script Editor.

Make sure that's set to Visual Studio. Unity will now open up scripts in Visual Studio when you click on the "Edit..."-button in the inspector, and the instance of Visual Studio that opens will have references to Unity's assemblies, which is what enables the intellisense.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by AlexQ · Jul 05, 2011 at 06:57 AM

No, Christian. I use Visual Studio to edit my Unity C# scripts. And I often need to look the definition of the API used in my source code from the editor of Visual Studio without switching to the web browser. Visual Studio offers the convenient functionality to look the Windows API definitions in MSDN from the editor of Visual Studio by press F1 key.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CHPedersen · Jul 05, 2011 at 09:06 AM 0
Share

This is not possible with Unity's API. It happens with the $$anonymous$$SDN information because $$anonymous$$icrosoft has included the same snippet of text in summary-tags before all their properties, classes and methods. Unity isn't designed specifically for Visual Studio and so does not include this functionality.

avatar image
0

Answer by TobyXD · Jan 16, 2013 at 03:30 AM

IDE Documentation

There is a iniline document at the unity wiki for MonoDevelop & Visual Studio But it seems support to unity 2.6

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Need help using Google Drive API from NuGet with Unity 0 Answers

Multiple Cameras Access API 0 Answers

Some questions about the Tilemap API 1 Answer

[ERROR 405] Unity WebGL with 3rd part APIs 1 Answer

My apk not working properly in runtime 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges