Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add MonoBehaviour Public Methods snippets and contributors #51

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ Snippets are devided in categories, all of them can be enabled/disabled in the o
- `Debug.LogWarningFormat()` (type _`logwarningformat`_)
- `Debug.DrawLine()` (type _`drawline`_)
- `Debug.DrawRay()` (type _`drawray`_)
- `CancelInvoke()` (type _`cancelinvoke`_)
- `Invoke()` (type _`invoke`_)
- `InvokeRepeating()` (type _`invokerepeating`_)
- `IsInvoking()` (type _`isinvoking`_)
- `StartCoroutine()` (type _`startcoroutine`_)
- `StopAllCoroutines()` (type _`stopallcoroutines`_)
- `StopCoroutine()` (type _`stopcoroutine`_)

- Attributes:

Expand Down
28 changes: 27 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "unity-code-snippets",
"displayName": "Unity Code Snippets",
"description": "All snippets you need for Unity3D development",
"version": "2.4.0",
"version": "2.5.0",
"publisher": "kleber-swf",
"repository": {
"type": "git",
Expand All @@ -13,6 +13,32 @@
"email": "[email protected]",
"url": "http://kleber-swf.com"
},
"contributors": [
{
"name": "Ferhat TEPE",
"url": "https://github.com/Ferhattepe"
},
{
"name": "farukaygun",
"url": "https://github.com/farukaygun"
},
{
"name": "dmbfm",
"url": "https://github.com/dmbfm"
},
{
"name": "zoosewu",
"url": "https://github.com/zoosewu"
},
{
"name": "isnt3174",
"url": "https://github.com/isnt3174"
},
{
"name": "TD12734",
"url": "https://github.com/TD12734"
}
],
"bugs": {
"url": "https://github.com/kleber-swf/vscode-unity-code-snippets/issues",
"email": "[email protected]"
Expand Down
35 changes: 35 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,41 @@
"description": "Draws a line from start to start + dir in world coordinates.",
"body": "Debug.DrawRay(Vector3 start$1, Vector3 dir$2, Color color = Color.white$3, float duration = 0.0f$4, bool depthTest = true$5);"
},
"MonoBehaviour CancelInvoke": {
"prefix": "CancelInvoke",
"description": "Cancels all Invoke calls on this MonoBehaviour.",
"body": "CancelInvoke();"
},
"MonoBehaviour Invoke": {
"prefix": "Invoke",
"description": "Invokes the method methodName in time seconds.",
"body": "Invoke(nameof($1), $2);"
},
"MonoBehaviour InvokeRepeating": {
"prefix": "InvokeRepeating",
"description": "Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds.",
"body": "InvokeRepeating(nameof($1), $2, $3);"
},
"MonoBehaviour IsInvoking": {
"prefix": "IsInvoking",
"description": "Is any invoke on methodName pending?",
"body": "IsInvoking(nameof($0));"
},
"MonoBehaviour StartCoroutine": {
"prefix": "StartCoroutine",
"description": "Starts a Coroutine.",
"body": "StartCoroutine($0);"
},
"MonoBehaviour StopAllCoroutines": {
"prefix": "StopAllCoroutines",
"description": "Stops all coroutines running on this behaviour.",
"body": "StopAllCoroutines();"
},
"MonoBehaviour StopCoroutine": {
"prefix": "StopCoroutine",
"description": "Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.",
"body": "StopCoroutine($0);"
},
"Attribute: SerializeField": {
"prefix": "sfield",
"body": [
Expand Down
42 changes: 42 additions & 0 deletions templates/calls.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,47 @@
"prefix": "DrawRay",
"description": "Draws a line from start to start + dir in world coordinates.",
"body": "Debug.DrawRay(Vector3 start$1, Vector3 dir$2, Color color = Color.white$3, float duration = 0.0f$4, bool depthTest = true$5);"
},

"MonoBehaviour CancelInvoke": {
"prefix": "CancelInvoke",
"description": "Cancels all Invoke calls on this MonoBehaviour.",
"body": "CancelInvoke();"
},

"MonoBehaviour Invoke": {
"prefix": "Invoke",
"description": "Invokes the method methodName in time seconds.",
"body": "Invoke(nameof($1), $2);"
},

"MonoBehaviour InvokeRepeating": {
"prefix": "InvokeRepeating",
"description": "Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds.",
"body": "InvokeRepeating(nameof($1), $2, $3);"
},

"MonoBehaviour IsInvoking": {
"prefix": "IsInvoking",
"description": "Is any invoke on methodName pending?",
"body": "IsInvoking(nameof($0));"
},

"MonoBehaviour StartCoroutine": {
"prefix": "StartCoroutine",
"description": "Starts a Coroutine.",
"body": "StartCoroutine($0);"
},

"MonoBehaviour StopAllCoroutines": {
"prefix": "StopAllCoroutines",
"description": "Stops all coroutines running on this behaviour.",
"body": "StopAllCoroutines();"
},

"MonoBehaviour StopCoroutine": {
"prefix": "StopCoroutine",
"description": "Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.",
"body": "StopCoroutine($0);"
}
}