How to Launch Unity Local API from MonoDevelop

In MonoDevelop, Ctrl + '(not F1) returns Unity API help information (help) from http://unity3d.com/support/documentation/ ... instead of reading it from a local copy of the Unity API. How can I get it to open local documentation sequentially?

+5
source share
2 answers

If you use Firefox , you can use Redirector to redirect to your local documentation. Install the addon and open the options. (Ctrl + Shift + A> Extensions> Redirector> Options)

Then use these values ​​(or similar, depending on the location of your local documentation):

  • Description: Unity Documentation (or whatever you want)
  • Example URL: http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=Transform (or any other search query. Used to preview what the link will be redirected to. This is optional.)
  • Include pattern: http://unity3d.com/support/documentation/ScriptReference/* Note that I use unity3d.com/support/documentation/ScriptReference/... because it is a URL opened by MonoDevelop, which is then redirected to docs.unity3d.com/ScriptReference/...
  • Redirect To: file:///C:/Program Files (x86)/Unity/Editor/Data/Documentation/html/en/ScriptReference/$1 If Unity is not installed on the C drive or if you use another OS, you will need to find out what the local URL looks like, and replace everything to the right of /ScriptReference/ with $1 . (from /ScriptReference/index.html to /ScriptReference/$1 )
  • Pattern Type: Wildcard
  • You can leave all other fields as they are.

Now, when you click the shortcut, you are automatically redirected to the local API link instead of the online version. I also tested it without an internet connection. Unfortunately, the addon is available only for Mozilla Firefox, and I have not yet been able to do this with other tools for different browsers.

Edit: Redirector is now also available for Chrome and Opera, according to the author’s site .

+2
source

Unity Mono AddIn searches for fixed paths for local documentation and uses it online if it is not found there. A standard installation obviously uses slightly different paths. To fix this for many cases, you can create the following symbolic links (like admin).

For Mac, create:

 for name in $(ls /Applications/Unity/Documentation/en/); do ln -s /Applications/Unity/Documentation/en/$name/ /Applications/Unity/Documentation/$name; done 

On Windows use:

 mkdir "c:\Program Files\Unity\Editor\Data\Documentation\Documentation" mklink /D "c:\Program Files\Unity\Editor\Data\Documentation\Documentation\ScriptReference" "c:\Program Files\Unity\Editor\Data\Documentation\en\ScriptReference\" ... 

Good effect: documentation of type Unity opens faster, and is also disconnected from Mono via standard ctrl + 'in many cases, especially if you mark the full type. Unfortunately, it still applies to the online version, if the search function is necessary in cases where there is no direct hit.

+1
source

Source: https://habr.com/ru/post/1201920/


All Articles