This extenstion is aim to speed up unity development.
For now it has two features:
- add new file function with asmdef file parsing and template editing
- unity project version managing (version increament and git auto tag and pushing)
-
to add New file
press
F1orctrl+shift+pand typeaddunityscript/ right click on file/folder in workspace and selectAdd Unity Scriptand follow prompts -
to update unity version press
F1orctrl+shift+pand typeunityappversionand follow prompts
-
asmdef file parsing: new csharp script will be added to the csproj defined be it's controling asmdef file, or defulat("Assembly-CSharp/Assembly-CSharp-Editor") if it is not controled by and asmdef file.
-
templating: when the extension run for the first time in the current unity project. it will generate 3 template for new file contents. These template are located in
\Asset\ScriptTemplates. a asmref file will also be created in the folder. this template is never reference in Editor/Builds. but they can utilize linter as the asmdef creates a valid csproj. -
the rule for template file name is: those with
.tpl.cscan be used in none-editor folder and.tpl.editor.cscan be used in editor folder. -
template can has json replacement setting in the first line commnet.
- each key is a JS regex matching what to replace (globally in the template file).
- value start with
$is recognized as variable. $basename is built-in variable containing the new file name without extension. other variable can be defined invariables.jsonin\Asset\ScriptTemplates. if the variable is not found a input box will show up asking for user input. - value start with
#is relative path to namespace converter. path up-to the string value will be converted to dot spread namespace. if the value is not found up to\Assetfolder. the string value it self will be returned. - other string value will trigger a a input box for user input.
template
public Class _someName\_{}will be replace bypublic Class NewFile\_{}when created with the name NewFile.cs
- optional add=>commit=>push git repo content
- update unity project version (Major/Minor/Patch/Build)
- added version tag to git project
- submit version and tag to git repo
- unity project version follows pattern Major.Minor.Patch and extra (IOS/Andriod) build number
- Increasing version number to the left will reset all version to the left to 0
- Android build number is a excetion as it need to be unique not it self so it is never rested
Calling out known issues can help limit users opening duplicate issues against your extension.
Users appreciate release notes as you update your extension.
Initial release of ...
Fixed issue #.
Added features X, Y, and Z.