ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Unity Completions Light

by oferei ST2/ST3

Unity3D Completions Light - Sublime Text Plugin

Labels auto-complete

Details

  • 2017.3.1
  • github.​com
  • github.​com
  • 4 months ago
  • 51 minutes ago
  • 4 years ago

Installs

  • Total 8K
  • Win 6K
  • OS X 2K
  • Linux 538
Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6
Windows 0 3 6 9 4 2 6 4 3 4 3 0 3 6 4 0 6 4 9 3 4 6 1 3 3 6 4 0 7 3 4 3 3 2 4 5 1 1 4 5 1 0 2 3 2 4
OS X 0 1 1 0 1 0 3 0 1 0 2 1 1 1 1 2 0 1 0 1 0 1 1 0 0 0 1 3 2 0 2 0 2 0 0 0 0 0 1 3 4 0 0 0 3 1
Linux 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 2 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 1 1 1 1 1 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Unity Completions Light

Package for Sublime Text

This package provides auto-completions for Unity classes, variables and functions. It works with all Unity-supported languages: JavaScript, C# and Boo.

This is a lighter version of the Unity Completions package. The full package shows a more detailed, easy-to-use pop-up menu for auto-completions, but on the other hand adds several seconds to Sublime Text's loading time. If you don't open and close Sublime Text too frequently, I recommend using the full version.

Installation

Package Control

The easiest way to install this package is using Package Control. Choose to install the “Unity Completions Light” package. (See installation and usage for help.) Package Control will also keep you updated.

Manual

Alternatively you can install this package manually:

  1. Open the packages directory from the Sublime Text menu (Preferences | Browse Packages…)
  2. Create a new directory called “Unity Completions Light”
  3. Copy the contents of this package into the new directory

Usage

Simply start typing any Unity term or press Ctrl+Space. You don't have to be accurate - a few consonants may be enough, preferably in the right order.

For example, type in gbjact and you will instantly be offered completions with these letters:

gbjact

Notice the type on the right side: [var] for variables, [class] for classes or parentheses with parameter names for functions.

Another example. Type in pscast and you will be offered:

pscast

Notice that functions may appear multiple times if they have several definitions. They can be distinguished by the parameter names. (The pop-up is too small to include the types…)

Once you select a function completion, a full snippet will be inserted, including the parameter types, names and default values:

SphereCast

You can then use Tab and Shift+Tab to quickly navigate between the parameters.

Limitations

The Unity Completions Light plugin is simple. It does not analyze the code to detect variable types. It only relies on the word being typed. In addition, Sublime Text's auto-complete is interrupted by dots. Typing in a dot will cause Sublime Text to ignore anything before the dot.

Let's say, for example, that you have a variable named enemy of type GameObject and you want assistance writing enemy.activeInHierarchy. Typing enemy. (with a dot) will not work. As soon as you type in the dot the completions pop-up will close.

If you continue typing after the dot, for example enemy.activein, you will be presented with completions, but they will only be based on the part after the dot: activein.

Suppose you choose the completion activeInHierarchy, you will end up with: enemy.GameObject.activeInHierarchy. The class name is inserted together with the variable name. Simply delete the class name manually.

Status

Up to date with Unity version 2017.3.1.

Generation

The Unity Completions Light package files were generated automatically using this generator. The data is based on the Unity Scripting Reference.

Boo Developers

Ahoy!

If you're developing in Boo, know that this package recognizes .boo files, but I recommend installing the Boo package as well if you're into syntax highlighting.

License

(The MIT License)

Copyright © 2013 Ofer Reichman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.