Skip to content

Commit bb47ab7

Browse files
committed
Merge branch 'release/2.3.0'
2 parents 95808cb + d297677 commit bb47ab7

File tree

14 files changed

+1436
-1227
lines changed

14 files changed

+1436
-1227
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
_The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)._
77

8+
## [2.3.0]
9+
10+
### Added
11+
12+
- Options to choose what group of snippets the extension should suggest:
13+
- Classes
14+
- Methods
15+
- Calls
16+
- Attributes
17+
- Experimental attributes
18+
19+
### Changed:
20+
21+
- `[SerializeField]` snippet changed to `sfield` (#44)
22+
- Several internal changes to better performance and maintainability
23+
24+
### Fixed:
25+
26+
- `StateMachineBehaviour` class template indent fix (#43)
27+
828
## [2.2.5] - 2023-08-06
929

1030
### Changed:
@@ -102,6 +122,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
102122
- :tada: Initial release
103123

104124
[Unreleased]: https://github.com/kleber-swf/vscode-unity-code-snippets/tree/master
125+
[2.3.0]: https://github.com/kleber-swf/vscode-unity-code-snippets/releases/2.3.0
126+
[2.2.5]: https://github.com/kleber-swf/vscode-unity-code-snippets/releases/2.2.5
105127
[2.2.0]: https://github.com/kleber-swf/vscode-unity-code-snippets/releases/2.2.0
106128
[2.1.0]: https://github.com/kleber-swf/vscode-unity-code-snippets/releases/tag/2.1.0
107129
[2.0.0]: https://github.com/kleber-swf/vscode-unity-code-snippets/releases/2.0.0

README.md

Lines changed: 122 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,48 @@ Adds the `private` accessor keyword to private members. Default: `true`.
6969

7070
![No private keyword](./images/doc/no-private.png)
7171

72-
## All the snippets
72+
### Auto Complete: Classes
73+
74+
Auto complete classes like `MonoBehaviour` and `Editor`.
75+
76+
### Auto Complete: Methods
77+
78+
Auto complete methods like `Start` and `OnCollisionEnter`.
79+
80+
### Auto Complete: Calls
7381

74-
Start typing the names to create the corresponding snippets.
82+
Auto complete utility calls like `Debug.Log` and `Debug.DrawLine`.
7583

76-
- Game classes:
84+
### Auto Complete: Attributes
7785

78-
- `MonoBehaviour`
79-
- `StateMachineBehaviour`
80-
- `NetworkBehaviour`
81-
- `ScriptableObject`
86+
Auto complete attributes like `[SerializeField]` and `[RequireComponent]` (just these two for now).
87+
88+
### Auto Complete: Experimental Attributes
89+
90+
Auto complete all other attributes like `[HideInInspector]` and `[ContextMenu]`. There are a lot o attributes and this can pollute your Intellisense popup.
91+
92+
## All the snippets
8293

83-
- Editor Classes:
94+
Start typing the names to create the corresponding snippet. Some of them have a special snippet to not mess up with the default Intellisense behavior.
8495

85-
- `Editor`
86-
- `Editor` with `Reorderable List`
87-
- `EditorWindow`
88-
- `PropertyDrawer`
89-
- `ScriptableWizard`
96+
Snippets are devided in categories, all of them can be enabled/disabled in the options.
97+
98+
- Classes:
99+
100+
- Game Classes:
101+
- `MonoBehaviour`
102+
- `StateMachineBehaviour`
103+
- `NetworkBehaviour`
104+
- `ScriptableObject`
105+
- Editor Classes:
106+
- `Editor`
107+
- `EditorWithReorderableList`
108+
- `EditorWindow`
109+
- `PropertyDrawer`
110+
- `ScriptableWizard`
111+
- Standard Classes:
112+
- `class`
113+
- `interface`
90114

91115
- MonoBehaviour Methods:
92116

@@ -117,9 +141,13 @@ Start typing the names to create the corresponding snippets.
117141
- `OnEnable()`
118142
- `OnFailedToConnect()`
119143
- `OnFailedToConnectToMasterServer()`
144+
- `OnFocus()`
120145
- `OnGUI()`
146+
- `OnHierarchyChange()`
147+
- `OnInspectorUpdate()`
121148
- `OnJointBreak()`
122149
- `OnJointBreak2D()`
150+
- `OnLostFocus()`
123151
- `OnMasterServerEvent()`
124152
- `OnMouseDown()`
125153
- `OnMouseDrag()`
@@ -130,16 +158,25 @@ Start typing the names to create the corresponding snippets.
130158
- `OnMouseUpAsButton()`
131159
- `OnNetworkInstantiate()`
132160
- `OnParticleCollision()`
161+
- `OnParticleSystemStopped()`
133162
- `OnParticleTrigger()`
134163
- `OnPlayerConnected()`
135164
- `OnPlayerDisconnected()`
136165
- `OnPostRender()`
137166
- `OnPreCull()`
138167
- `OnPreRender()`
168+
- `OnProjectChange()`
139169
- `OnRenderImage()`
140170
- `OnRenderObject()`
171+
- `OnSceneGUI()`
172+
- `OnSelectionChange()`
141173
- `OnSerializeNetworkView()`
142174
- `OnServerInitialized()`
175+
- `OnStateEnter()`
176+
- `OnStateExit()`
177+
- `OnStateIK()`
178+
- `OnStateMove()`
179+
- `OnStateUpdate()`
143180
- `OnTransformChildrenChanged()`
144181
- `OnTransformParentChanged()`
145182
- `OnTriggerEnter()`
@@ -150,24 +187,87 @@ Start typing the names to create the corresponding snippets.
150187
- `OnTriggerStay2D()`
151188
- `OnValidate()`
152189
- `OnWillRenderObject()`
190+
- `OnWizardCreate()`
191+
- `OnWizardOtherButton()`
192+
- `OnWizardUpdate()`
153193
- `Reset()`
154194
- `Start()`
155195
- `Update()`
156196

157-
- Debug class:
197+
- Calls:
158198

159-
- `Debug.DrawLine()`
160-
- `Debug.DrawRay()`
161-
162-
- Some useful code snippets:
163199
- `Debug.Log()` (type _`log`_)
164200
- `Debug.LogError()` (type _`logerror`_)
165-
- `Debug.LogWarning()` (type _`logwarning`_)
166201
- `Debug.LogException()` (type _`logexception`_)
167-
- `[SerializeField]`
202+
- `Debug.LogWarning()` (type _`logwarning`_)
203+
- `Debug.LogFormat()` (type _`logformat`_)
204+
- `Debug.LogErrorFormat()` (type _`logerrorformat`_)
205+
- `Debug.LogWarningFormat()` (type _`logwarningformat`_)
206+
- `Debug.DrawLine()` (type _`drawline`_)
207+
- `Debug.DrawRay()` (type _`drawray`_)
208+
209+
- Attributes:
210+
211+
- `[SerializeField]` (type _`sfield`_)
168212
- `[RequireComponent]`
169-
- Standard `class`
170-
- Standard `interface`
213+
214+
- Experimental snippets:
215+
- `[AddComponentMenu]`
216+
- `[AssemblyIsEditorAssembly]`
217+
- `[BeforeRenderOrder]`
218+
- `[CanEditMultipleObjects]`
219+
- `[ColorUsage]`
220+
- `[ContextMenu]`
221+
- `[ContextMenuItem]`
222+
- `[CreateAssetMenu]`
223+
- `[CustomEditor]`
224+
- `[CustomEditorForRenderPipeline]`
225+
- `[CustomGridBrush]`
226+
- `[CustomPreview]`
227+
- `[CustomPropertyDrawer]`
228+
- `[Delayed]`
229+
- `[DisallowMultipleComponent]`
230+
- `[DrawGizmo]`
231+
- `[EditorWindowTitle]`
232+
- `[ExcludeFromObjectFactory]`
233+
- `[ExcludeFromPreset]`
234+
- `[ExecuteAlways]`
235+
- `[ExecuteInEditMode]`
236+
- `[FilePath]`
237+
- `[GradientUsage]`
238+
- `[GUITarget]`
239+
- `[Header]`
240+
- `[HelpURL]`
241+
- `[HideInCallstack]`
242+
- `[HideInInspector]`
243+
- `[Icon]`
244+
- `[ImageEffectAfterScale]`
245+
- `[ImageEffectAllowedInSceneView]`
246+
- `[ImageEffectOpaque]`
247+
- `[ImageEffectTransformsToLDR]`
248+
- `[ImageEffectUsesCommandBuffer]`
249+
- `[InitializeOnEnterPlayMode]`
250+
- `[InitializeOnLoad]`
251+
- `[InitializeOnLoadMethod]`
252+
- `[InspectorName]`
253+
- `[InspectorOrder]`
254+
- `[LightingExplorerExtension]`
255+
- `[Localization]`
256+
- `[MenuItem]`
257+
- `[Min]`
258+
- `[Multiline]`
259+
- `[NonReorderable]`
260+
- `[PreferBinarySerialization]`
261+
- `[Range]`
262+
- `[RuntimeInitializeOnLoadMethod]`
263+
- `[SelectionBase]`
264+
- `[SerializeReference]`
265+
- `[SettingsProvider]`
266+
- `[SettingsProviderGroup]`
267+
- `[SharedBetweenAnimators]`
268+
- `[Space]`
269+
- `[TextArea]`
270+
- `[Tooltip]`
171271

172272
If you have any suggestion, please don't give the extension a bad review. Instead, [open an issue in the Github project](https://github.com/kleber-swf/vscode-unity-code-snippets/issues) page and I'll try to add it when/if possible.
173273

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "unity-code-snippets",
33
"displayName": "Unity Code Snippets",
44
"description": "All snippets you need for Unity3D development",
5-
"version": "2.2.5",
5+
"version": "2.3.0",
66
"publisher": "kleber-swf",
77
"repository": {
88
"type": "git",
@@ -14,7 +14,7 @@
1414
"url": "http://kleber-swf.com"
1515
},
1616
"bugs": {
17-
"url": "https://github.com/kleber-swf/vscode-unity-code-snippets",
17+
"url": "https://github.com/kleber-swf/vscode-unity-code-snippets/issues",
1818
"email": "kleber.swf@gmail.com"
1919
},
2020
"homepage": "https://github.com/kleber-swf/vscode-unity-code-snippets",
@@ -55,6 +55,7 @@
5555
"unity-code-snippets.style": {
5656
"type": "string",
5757
"markdownDescription": "Select the [indentation style](https://en.wikipedia.org/wiki/Indentation_style) for the snippets",
58+
"order": 0,
5859
"default": "kr",
5960
"enum": [
6061
"kr",
@@ -71,8 +72,39 @@
7172
},
7273
"unity-code-snippets.usePrivateKeyword": {
7374
"type": "boolean",
75+
"order": 10,
7476
"markdownDescription": "Use `private` accessor keyword for private members",
7577
"default": true
78+
},
79+
"unity-code-snippets.autoComplete.classes": {
80+
"type": "boolean",
81+
"order": 100,
82+
"markdownDescription": "Auto complete classes like `MonoBehaviour` and `Editor`.",
83+
"default": true
84+
},
85+
"unity-code-snippets.autoComplete.methods": {
86+
"type": "boolean",
87+
"order": 110,
88+
"markdownDescription": "Auto complete methods like `Start` and `OnCollisionEnter`.",
89+
"default": true
90+
},
91+
"unity-code-snippets.autoComplete.calls": {
92+
"type": "boolean",
93+
"order": 120,
94+
"markdownDescription": "Auto complete utility calls like `Debug.Log` and `Debug.DrawLine`.",
95+
"default": true
96+
},
97+
"unity-code-snippets.autoComplete.attributes": {
98+
"type": "boolean",
99+
"order": 130,
100+
"markdownDescription": "Auto complete attributes like `[SerializeField]` and `[RequireComponent]`.",
101+
"default": true
102+
},
103+
"unity-code-snippets.autoComplete.experimentalAttributes": {
104+
"type": "boolean",
105+
"order": 140,
106+
"markdownDescription": "[Experimental] Auto complete all other attributes like `[HideInInspector]` and `[ContextMenu]`. There are a lot o attributes and this can pollute your Intellisense popup.",
107+
"default": false
76108
}
77109
}
78110
}

0 commit comments

Comments
 (0)