Giter Site home page Giter Site logo

avinzarlez / unity-tools Goto Github PK

View Code? Open in Web Editor NEW
31.0 5.0 8.0 399 KB

A Visual Studio Code Extension to provide some tools for Unity development

Home Page: https://marketplace.visualstudio.com/items?itemName=Tobiah.unity-tools

License: MIT License

TypeScript 100.00%
unity-development unity unity-3d unity3d-games visual-studio-code visual-studio-extension vscode vscode-extension

unity-tools's Introduction

Unity Tools for Visual Studio Code

.github/workflows/main.yml

Marketplace Version Installs Rating

What this extension is

This is an unofficial extension created by Tobiah Zarlez, and is not affiliated in any way with Unity Technologies.

The goal of this extension is to add miscellaneous functionality to Visual Studio Code for Unity developers.

This extension also acts as an extension package for another Unity related VSCode extension. Specifically, "Unity.unity-debug"

What this extension isn't

This is not a comprehensive set of tools for Unity development, nor does it provide any debugging features.

If you want to debug your Unity projects, I would recommend getting Unity's official debugger for Visual Studio Code.

Can you add XZY feature?

Possibly! Let me know, I'd love to hear your suggestions on what tools you'd like to see added to this collection.

How to install

You can install this extension directly from the Visual Studio Marketplace.

Launch VS Code Quick Open (Ctrl+P) and copy/paste the following command:

ext install unity-tools

Feature list

Command: Open Documentation for Selection

Use the pallet command "Unity Tools: Open Documentation for Selection" (Cmd+' on OSX or Ctrl+' on Windows and Linux) to open the Unity Documentation for the currently selected class.

Command: Search Documentation

Use the pallet command "Unity Tools: Search Documentation" (Shortcut: Cmd+Shift+' on OSX or Ctrl+Shift+' on Windows and Linux) where you can quickly enter whatever you want to search for.

Command: Search MSFT Documentation

Use the pallet command "Unity Tools: Search MSFT Documentation" where you can enter whatever you want to search the MSFT documentation for.

Command: Open VSCode Documentation

Added the pallet command "Unity Tools: Open VSCode Documentation" to open the Unity Development with VS Code page on the Visual Studio Code Documentation.

Command: Generate Organizational Folders

Added the pallet command "Unity Tools: Generate Organizational Folders" to create some default organizational folders to your project's Assets Folder. The list of default folders are below:

  • Scenes
  • Scripts
  • Prefabs
  • Materials
  • Audio

Configuration

The Unity-Tools command Generate Organizational Folders can be configured to create a set of folders of your choosing, instead of the 5 default ones: Scenes, Scripts, Prefabs, Materials, and Audio.

To do this, create or open your ./.vscode/settings.json file and fill in the below fields:

{
    "unity-tools.defaultOrganizationFolders" : ["Your","New", "Folder","Names"]
}

You can also set which Unity version should be used when accessing online documentation. Make sure the version number you enter is valid for Unity's documentation.

{
    "unity-tools.documentationVersion" : "2018.4"
}

You can also enable/disable the "Open Documentation" option in right-click menu by the below setting. Default value is true.

{
    "unity-tools.enableRightClickSearch" : true
}

If you rather search local documentation rather than online, set a value to unity-tools.localDocumentationPath.

NOTE: unity-tools.localDocumentationPath should NOT include a trailing slash /, file:/// nor any filename like index.html or 30_search.html

Due to the nature of queries in local file paths (at least on Windows, I have not tested on Mac/Linux), you are also required to set a default browser with unity-tools.localDocumentationViewer. For example, firefox, iexplore, or chrome. You can also set the exact path, if your browser doesn't have a command. Example: C:/Program Files/Mozilla Firefox/firefox.exe

If you do not set localDocumentationViewer, localDocumentationPath will not work. This may or may not be true on Mac or Linux, I have not had the opportunity to test it! If you have, please let me know.

{
    "unity-tools.localDocumentationPath" : "Applications/Unity/Documentation/en/ScriptReference/",
    "unity-tools.localDocumentationViewer" : "firefox"
}

Other resources

Here are some other resources I recommend:

unity-tools's People

Contributors

algirdask avatar avinzarlez avatar dependabot[bot] avatar felixrieseberg avatar ilgarmehmetali avatar katvharris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

unity-tools's Issues

Installing package, then uninstalling creates errors in Visual code.

What I did was install the package, then uninstalled it and this problem occurred.
Might be Visual Code, not 100% sure.

[ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: Diagnostic must have span '[6887..6887)' Parameter name: diagnostics System.ArgumentException: Diagnostic must have span '[6887..6887)' Parameter name: diagnostics at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.VerifyDiagnosticsArgument (ImmutableArray1 diagnostics, TextSpan span) <0x112574170 + 0x00417> in :0
at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext..ctor (Microsoft.CodeAnalysis.Document document, TextSpan span, ImmutableArray1 diagnostics, System.Action2 registerCodeFix, Boolean verifyArguments, CancellationToken cancellationToken) <0x112573ed0 + 0x00057> in :0
at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext..ctor (Microsoft.CodeAnalysis.Document document, TextSpan span, ImmutableArray1 diagnostics, System.Action2 registerCodeFix, CancellationToken cancellationToken) <0x112573e70 + 0x00042> in :0
at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.CodeActionHelper+d__2.MoveNext () <0x112572e70 + 0x0080c> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x112575140 + 0x0001f> in <filename unknown>:0 at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.CodeActionHelper+<GetActions>d__0.MoveNext () <0x11256f0d0 + 0x00614> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in :0
at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.GetCodeActionsService+d__4.MoveNext () <0x11256c960 + 0x00182> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.Endpoint.EndpointHandler2+d__18[TRequest,TResponse].MoveNext () <0x10d0c1500 + 0x00421> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.Endpoint.EndpointHandler2+d__16[TRequest,TResponse].MoveNext () <0x10d0bea10 + 0x0093f> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.EndpointMiddleware+<Invoke>d__7.MoveNext () <0x10d0b97e0 + 0x002b2> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x10448a1e0 + 0x00012> in <filename unknown>:0 at Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware+<Invoke>d__4.MoveNext () <0x10d0b7220 + 0x003db> in <filename unknown>:0 [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 500 25ms [ERROR:Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware] An unhandled exception has occurred: Diagnostic must have span '[6888..6888)' Parameter name: diagnostics System.ArgumentException: Diagnostic must have span '[6888..6888)' Parameter name: diagnostics at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.VerifyDiagnosticsArgument (ImmutableArray1 diagnostics, TextSpan span) <0x112574170 + 0x00417> in :0
at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext..ctor (Microsoft.CodeAnalysis.Document document, TextSpan span, ImmutableArray1 diagnostics, System.Action2 registerCodeFix, Boolean verifyArguments, CancellationToken cancellationToken) <0x112573ed0 + 0x00057> in :0
at Microsoft.CodeAnalysis.CodeFixes.CodeFixContext..ctor (Microsoft.CodeAnalysis.Document document, TextSpan span, ImmutableArray1 diagnostics, System.Action2 registerCodeFix, CancellationToken cancellationToken) <0x112573e70 + 0x00042> in :0
at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.CodeActionHelper+d__2.MoveNext () <0x112572e70 + 0x0080c> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x112575140 + 0x0001f> in <filename unknown>:0 at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.CodeActionHelper+<GetActions>d__0.MoveNext () <0x11256f0d0 + 0x00614> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in :0
at OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.GetCodeActionsService+d__4.MoveNext () <0x11256c960 + 0x00182> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.Endpoint.EndpointHandler2+d__18[TRequest,TResponse].MoveNext () <0x10d0c1500 + 0x00421> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.Endpoint.EndpointHandler2+d__16[TRequest,TResponse].MoveNext () <0x10d0bea10 + 0x0093f> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in :0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in :0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in :0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () <0x10448a630 + 0x00017> in <filename unknown>:0 at OmniSharp.Middleware.EndpointMiddleware+<Invoke>d__7.MoveNext () <0x10d0b97e0 + 0x002b2> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x10448c430 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x10448a2f0 + 0x000b3> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x10448a250 + 0x00093> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x10448a200 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x10448a1e0 + 0x00012> in <filename unknown>:0 at Microsoft.AspNet.Diagnostics.ErrorHandlerMiddleware+<Invoke>d__4.MoveNext () <0x10d0b7220 + 0x003db> in <filename unknown>:0 [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 500 1ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 476ms

Use `extensionPack` instead of `extensionDependencies` property for defining pack

From release v1.26, defining an Extension Pack now uses a new property called extensionPack instead of extensionDependencies in package.json. This is because extensionDependencies is mainly used to define functional dependencies and an Extension Pack should not have any functional dependencies with its bundled extensions and they should be manageable independent of the pack.

So please use extensionPack property for defining the pack.

For more details refer to Release notes

[BUG] Extension Slows IntelliSense

Got a review for this extension by Sebastian Jantos:

Didn't feel any development speed boost, but for now, this extension slows down IntelliSense so much, that I had to wait few seconds before anything was happening and this disqualifies this extension. (disabling it, improved IntelliSense response time to fraction of second)

Are other people experiencing slowdown?

To test: Is this related to this extension, or perhaps the official Unity debug extension it auto installs with it?

[BUG] Open documentation for selection goes to wrong page

Describe the bug
Extension always opens file:///Applications/Unity/Documentation/en/ScriptReference/30_search.html

To Reproduce
Steps to reproduce the behavior:

  1. Go to a c# files
  2. Right-Click on a class
  3. Select 'Unity Tools: Open documentation for selection'
  4. file:///Applications/Unity/Documentation/en/ScriptReference/30_search.html opens with no params

config
Extension is configured for local documentation : "Applications/Unity/Documentation/en/ScriptReference"
Local documentation viewer = "safari"

Expected behavior
Help for the selected class should open. Eg:
file:///Applications/Unity/Documentation/en/ScriptReference/30_search.html?q=GameObject

VSCode (please complete the following information):

  • OS: OS X
  • Version Mojave

Feature Request: Allow Creating Organizational Folders at Any Level

I often have subfolders that could benefit from having the same organizational structure. I wish I could look at the 'explorer' and right click on a folder and say "Create Unity Organizational Folders" at that level and have them be created.

Bonus points if I could customize the list of items created if that's not already possible, and even better if maybe it could auto-organize loose files in the folder into the appropriate folder?

[FEATURE] Colour picker

Currently there's no way to preview colours, I was wondering if a colour picker could be added. I imagine it'd be fairly easy to piggyback the built in one. That works with css etc.
image

image

[FEATURE] Right Click Search

Is your feature request related to a problem? Please describe.
As came up when debugging #60

Describe the solution you'd like
It might be nice to be able to right-click words to search them rather than having to highlight. Will have to look into automatically highlighting/collecting word that was right click selected in order to pass it along.

Describe alternatives you've considered
If unfeasible can leave as is.

Additional context
Making this issue to remind myself later.

On the Mac CMD+' does not bring up Unity Docs

On OS X, your documentation says to use CMD+' to open documentation, unfortunately, this does not work. We found that if you do CTRL+' (The windows way) it works. But this is not documented in the extension. Is this intended, if so, you should update. If it's not, this is a bug that needs fixing.

In package.json, on line 55, it has CTRL regardless of OS

       "key": "ctrl+'",
        "when": "editorTextFocus && editorLangId == 'csharp'",
        "command": "extension.unityOpenDocs"
      },
      {
        "key": "ctrl+shift+'",
        "when": "editorTextFocus && editorLangId == 'csharp'",
        "command": "extension.unitySearchDocs"

[FEATURE] Allow for setting Unity documentation version per project

Feature Request

First off, thanks for building this extension. I literally wouldn't be using VsCode in Unity without it.

My feature request is to add the ability for the user to set the version of docs they would like to default to when ctrl-` is pressed.

Problem Description

When I ctrl-` to get to documentation, it defaults to the newest documentation as of the moment I press it. As I am generally working in the LTS versions only, so that means I am often looking at docs that are newer than my editor version.

My Suggestion

Allow the user to specify the target version via something like the following in their settings.json:

{
     "unity-tools.documentationVersion": "2018.4",
}

As this config option would be per project (stored in the {projectFolder}/.vscode/settings.json), this would allow me to manually set the version of the unity editor docs which I would like to see for each project.

Effect of this Feature

When the user highlights a unity keyword and either presses ctrl-` or selects Open documentation for selection, this would change the search string from:
https://docs.unity3d.com/ScriptReference/30_search.html?q={Selection}

To something like:
https://docs.unity3d.com/2018.4/Documentation/ScriptReference/30_search.html?q=Selection

The 2018.4 in the above example would be the string of unity-tools.documentationVersion in settings.json.

Possible Code

I don't know enough about how extensions are loaded into vscode, so I don't know how to test this and send you a proper PR -- but I believe this is all that you'd need to add to unity-tools/src/search.ts:

var settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('unity-tools');
var documentationVersion: string[] | undefined = settings.get('documentationVersion');

if (documentationVersion === undefined) {
     let unity_search = "http://docs.unity3d.com/ScriptReference/30_search.html";
} else {
     let unity_search = "http://docs.unity3d.com/" + documentationVersion + "/Documentation/ScriptReference/30_search.html";
}

Possibly Related

This might be resolved in PR #21 (search offline docs), though it may have the same issue as I have multiple editors installed on my pc as well.

Ideally, I would have expected the lookup to check for the most recently focused Unity and just pick the version of the docs that matches that, but I could imagine that being much more of a chore to build.

[BUG] Unity docs keyword for search is not what was selected

Describe the bug
When I highlight something and select "Unity Tools: Open documentation for selection" the website that opens has the wrong search word. Instead of searching for what I selected it searches for "Looking" or "Starting"

To Reproduce
Steps to reproduce the behavior:

  1. Create an Empty MonoBehaviour
  2. Select the word "MonoBehaviour"
  3. Right Click and pick Unity Tools: Open documentation for selection (Or use the shortcut Ctrl + ')
  4. The website opened is not https://docs.unity3d.com/ScriptReference/30_search.html?q=MonoBehaviour as it should

Expected behavior
The website opened should append the selection after https://docs.unity3d.com/ScriptReference/30_search.html?q=

VSCode (please complete the following information):

  • Version: 1.35.0 (system setup)
  • Commit: 553cfb2c2205db5f15f3ee8395bbd5cf066d357d
  • Date: 2019-06-04T01:17:12.481Z
  • Electron: 3.1.8
  • Chrome: 66.0.3359.181
  • Node.js: 10.2.0
  • V8: 6.6.346.32
  • OS: Windows_NT x64 10.0.17763

Update to new open api

VSCode was updated to include a new API for opening URLs. I should switch to using this.


// open default browser
await vscode.env.openExternal(vscode.Uri.parse("https://github.com/Microsoft/vscode/issues/66741"));

Can't change default Organization Folder

maybe i'm dumb, but i'm unable to change those folders

instruction says

To do this simply open or create ./.vscode/settings.json and fill in the following fields:
{
"unity-tools.defaultOrganizationFolders" : ["Your","New", "Folder","Names"]
}

tried doing that in every way i could think off for last two hours
all i get is "Unknown configuration setting" error.

Feature Suggestion:support offline documentation

Sometimes the network is not good or no network ,
open offline documentation is faster than online.

Local path of document(mac):
file:///Applications/Unity/Documentation/en/ScriptReference/index.html

Thank! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.