forked from dunward/clover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unitySnippets.json
402 lines (402 loc) · 13 KB
/
unitySnippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
{
"UnityEngine.MonoBehaviour.Awake": {
"prefix": "Awake",
"body": [
"private void Awake()",
"{",
"\t$1",
"}"
],
"description": "Awake is always called before any Start functions. This allows you to order initialization of scripts."
},
"UnityEngine.MonoBehaviour.OnEnable": {
"prefix": "OnEnable",
"body": [
"private void OnEnable()",
"{",
"\t$1",
"}"
],
"description": "This function is called when the object becomes enabled and active."
},
"UnityEngine.MonoBehaviour.Reset": {
"prefix": "Reset",
"body": [
"private void Reset()",
"{",
"\t$1",
"}"
],
"description": "Reset is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time. This function is only called in editor mode."
},
"UnityEngine.MonoBehaviour.Start": {
"prefix": "Start",
"body": [
"private void Start()",
"{",
"\t$1",
"}"
],
"description": "Start is called on the frame when a script is enabled just before any of the Update methods are called the first time."
},
"UnityEngine.MonoBehaviour.FixedUpdate": {
"prefix": "FixedUpdate",
"body": [
"private void FixedUpdate()",
"{",
"\t$1",
"}"
],
"description": "MonoBehaviour.FixedUpdate has the frequency of the physics system; it is called every fixed frame-rate frame."
},
"UnityEngine.MonoBehaviour.OnTriggerEnter": {
"prefix": "OnTriggerEnter",
"body": [
"private void OnTriggerEnter(Collider collider)",
"{",
"\t$1",
"}"
],
"description": "OnTriggerEnter happens on the FixedUpdate function when two GameObjects collide."
},
"UnityEngine.MonoBehaviour.OnTriggerEnter2D": {
"prefix": "OnTriggerEnter2D",
"body": [
"private void OnTriggerEnter2D(Collider2D collider)",
"{",
"\t$1",
"}"
],
"description": "Sent when another object enters a trigger collider attached to this object (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnTriggerStay": {
"prefix": "OnTriggerStay",
"body": [
"private void OnTriggerStay(Collider collider)",
"{",
"\t$1",
"}"
],
"description": "OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger."
},
"UnityEngine.MonoBehaviour.OnTriggerStay2D": {
"prefix": "OnTriggerStay2D",
"body": [
"private void OnTriggerStay2D(Collider2D collider)",
"{",
"\t$1",
"}"
],
"description": "Sent each frame where another object is within a trigger collider attached to this object (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnTriggerExit": {
"prefix": "OnTriggerExit",
"body": [
"private void OnTriggerExit(Collider collider)",
"{",
"\t$1",
"}"
],
"description": "OnTriggerExit is called when the Collider other has stopped touching the trigger."
},
"UnityEngine.MonoBehaviour.OnTriggerExit2D": {
"prefix": "OnTriggerExit2D",
"body": [
"private void OnTriggerExit2D(Collider2D collider)",
"{",
"\t$1",
"}"
],
"description": "Sent when another object leaves a trigger collider attached to this object (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnCollisionEnter": {
"prefix": "OnCollisionEnter",
"body": [
"private void OnCollisionEnter(Collision collision)",
"{",
"\t$1",
"}"
],
"description": "OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider."
},
"UnityEngine.MonoBehaviour.OnCollisionEnter2D": {
"prefix": "OnCollisionEnter2D",
"body": [
"private void OnCollisionEnter2D(Collision2D collision)",
"{",
"\t$1",
"}"
],
"description": "Sent when an incoming collider makes contact with this object's collider (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnCollisionStay": {
"prefix": "OnCollisionStay",
"body": [
"private void OnCollisionStay(Collision collision)",
"{",
"\t$1",
"}"
],
"description": "OnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody."
},
"UnityEngine.MonoBehaviour.OnCollisionStay2D": {
"prefix": "OnCollisionStay2D",
"body": [
"private void OnCollisionStay2D(Collision2D collision)",
"{",
"\t$1",
"}"
],
"description": "Sent when a collider on another object stops touching this object's collider (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnCollisionExit": {
"prefix": "OnCollisionExit",
"body": [
"private void OnCollisionExit(Collision collision)",
"{",
"\t$1",
"}"
],
"description": "OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider."
},
"UnityEngine.MonoBehaviour.OnCollisionExit2D": {
"prefix": "OnCollisionExit2D",
"body": [
"private void OnCollisionExit2D(Collision2D collision)",
"{",
"\t$1",
"}"
],
"description": "Sent each frame where a collider on another object is touching this object's collider (2D physics only)."
},
"UnityEngine.MonoBehaviour.OnMouseEnter": {
"prefix": "OnMouseEnter",
"body": [
"private void OnMouseEnter()",
"{",
"\t$1",
"}"
],
"description": "Called when the mouse enters the Collider."
},
"UnityEngine.MonoBehaviour.OnMouseExit": {
"prefix": "OnMouseExit",
"body": [
"private void OnMouseExit()",
"{",
"\t$1",
"}"
],
"description": "Called when the mouse is not any longer over the Collider."
},
"UnityEngine.MonoBehaviour.OnMouseDown": {
"prefix": "OnMouseDown",
"body": [
"private void OnMouseDown()",
"{",
"\t$1",
"}"
],
"description": "OnMouseDown is called when the user has pressed the mouse button while over the Collider."
},
"UnityEngine.MonoBehaviour.OnMouseUp": {
"prefix": "OnMouseUp",
"body": [
"private void OnMouseUp()",
"{",
"\t$1",
"}"
],
"description": "OnMouseUp is called when the user has released the mouse button."
},
"UnityEngine.MonoBehaviour.OnMouseUpAsButton": {
"prefix": "OnMouseUpAsButton",
"body": [
"private void OnMouseUpAsButton()",
"{",
"\t$1",
"}"
],
"description": "OnMouseUpAsButton is only called when the mouse is released over the same Collider as it was pressed."
},
"UnityEngine.MonoBehaviour.OnMouseOver": {
"prefix": "OnMouseOver",
"body": [
"private void OnMouseOver()",
"{",
"\t$1",
"}"
],
"description": "Called every frame while the mouse is over the Collider."
},
"UnityEngine.MonoBehaviour.OnMouseDrag": {
"prefix": "OnMouseDrag",
"body": [
"private void OnMouseDrag()",
"{",
"\t$1",
"}"
],
"description": "OnMouseDrag is called when the user has clicked on a Collider and is still holding down the mouse."
},
"UnityEngine.MonoBehaviour.Update": {
"prefix": "Update",
"body": [
"private void Update()",
"{",
"\t$1",
"}"
],
"description": "Update is called every frame, if the MonoBehaviour is enabled."
},
"UnityEngine.MonoBehaviour.LateUpdate": {
"prefix": "LateUpdate",
"body": [
"private void LateUpdate()",
"{",
"\t$1",
"}"
],
"description": "LateUpdate is called every frame, if the Behaviour is enabled."
},
"UnityEngine.MonoBehaviour.PreCull": {
"prefix": "PreCull",
"body": [
"private void PreCull()",
"{",
"\t$1",
"}"
],
"description": "Event function that Unity calls before a Camera culls the scene."
},
"UnityEngine.MonoBehaviour.OnWillRenderObject": {
"prefix": "OnWillRenderObject",
"body": [
"private void OnWillRenderObject()",
"{",
"\t$1",
"}"
],
"description": "OnWillRenderObject is called for each camera if the object is visible and not a UI element."
},
"UnityEngine.MonoBehaviour.OnBecameVisible": {
"prefix": "OnBecameVisible",
"body": [
"private void OnBecameVisible()",
"{",
"\t$1",
"}"
],
"description": "OnBecameVisible is called when the renderer became visible by any camera."
},
"UnityEngine.MonoBehaviour.OnBecameInvisible": {
"prefix": "OnBecameInvisible",
"body": [
"private void OnBecameInvisible()",
"{",
"\t$1",
"}"
],
"description": "OnBecameInvisible is called when the renderer is no longer visible by any camera."
},
"UnityEngine.MonoBehaviour.OnPreRender": {
"prefix": "OnPreRender",
"body": [
"private void OnPreRender()",
"{",
"\t$1",
"}"
],
"description": "Event function that Unity calls before a Camera renders the scene."
},
"UnityEngine.MonoBehaviour.OnRenderObject": {
"prefix": "OnRenderObject",
"body": [
"private void OnRenderObject()",
"{",
"\t$1",
"}"
],
"description": "OnRenderObject is called after camera has rendered the scene."
},
"UnityEngine.MonoBehaviour.OnPostRender": {
"prefix": "OnPostRender",
"body": [
"private void OnPostRender()",
"{",
"\t$1",
"}"
],
"description": "Event function that Unity calls after a Camera renders the scene."
},
"UnityEngine.MonoBehaviour.OnRenderImage": {
"prefix": "OnRenderImage",
"body": [
"private void OnRenderImage(RenderTexture src, RenderTexture dest)",
"{",
"\t$1",
"}"
],
"description": "Event function that Unity calls after a Camera has finished rendering, that allows you to modify the Camera's final image."
},
"UnityEngine.MonoBehaviour.OnDrawGizmos": {
"prefix": "OnDrawGizmos",
"body": [
"private void OnDrawGizmos()",
"{",
"\t$1",
"}"
],
"description": "OnDrawGizmos is called when the gizmos are drawn."
},
"UnityEngine.MonoBehaviour.OnGUI": {
"prefix": "OnGUI",
"body": [
"private void OnGUI()",
"{",
"\t$1",
"}"
],
"description": "OnGUI is called for rendering and handling GUI events."
},
"UnityEngine.MonoBehaviour.OnApplicationPause": {
"prefix": "OnApplicationPause",
"body": [
"private void OnApplicationPause(bool pauseStatus)",
"{",
"\t$1",
"}"
],
"description": "Sent to all GameObjects when the playing application pauses or resumes on losing or regaining focus."
},
"UnityEngine.MonoBehaviour.OnApplicationQuit": {
"prefix": "OnApplicationQuit",
"body": [
"private void OnApplicationQuit()",
"{",
"\t$1",
"}"
],
"description": "Sent to all GameObjects before the application quits."
},
"UnityEngine.MonoBehaviour.OnDisable": {
"prefix": "OnDisable",
"body": [
"private void OnDisable()",
"{",
"\t$1",
"}"
],
"description": "This function is called when the behaviour becomes disabled."
},
"UnityEngine.MonoBehaviour.OnDestroy": {
"prefix": "OnDestroy",
"body": [
"private void OnDestroy()",
"{",
"\t$1",
"}"
],
"description": "Destroying the attached Behaviour will result in the game or Scene receiving OnDestroy."
}
}