Unity Completions
Unity3D Completions - Sublime Text Plugin
Details
Installs
- Total 26K
- Win 16K
- Mac 8K
- Linux 2K
Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 1 | 4 | 0 | 2 | 5 | 1 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 2 | 3 | 0 | 0 | 0 | 1 | 0 | 2 | 2 | 0 | 0 | 0 | 1 | 3 | 1 | 0 | 0 | 3 | 0 | 1 | 0 | 3 | 0 | 3 | 3 | 1 | 3 | 2 | 3 | 1 | 2 |
Mac | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 3 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Unity Completions
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.
There exists a lighter version of this package. The auto-completions pop-up menu shown by the light package is not as nice and informative, but on the other hand the light package does not add any delay to Sublime Text's loading time. If you open and close Sublime Text frequently, I recommend using the light version.
Installation
Package Control
The easiest way to install this package is using Package Control. Choose to install the “Unity Completions” package. (See installation and usage for help.) Package Control will also keep you updated.
Troubleshooting
Package Control may get stuck while installing the library. If that happens you'd see the animation running at the bottom indefinitely:
This seems to be a bug in Package Control. I'm not sure what causes it - perhaps the relatively large size of this package. You are welcome to try the following solutions:
- Wait a little longer - it may take a few (3-5) minutes!
- Restart Sublime Text and try again, this time standing on one foot
- Check your user settings (Preferences.sublime-settings) and make sure the package is not listed under “ignored_packages”
- Consider using Unity Completions Light
Manual
Alternatively you can install this package manually:
- Open the packages directory from the Sublime Text menu (Preferences | Browse Packages…)
- Create a new directory called “Unity Completions”
- 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:
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:
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:
You can then use Tab and Shift+Tab to quickly navigate between the parameters.
Limitations
The Unity Completions 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 2019.2.16.
Generation
The Unity Completions 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.