Created
November 13, 2019 13:30
-
-
Save Josef212/8462cc5546bcd04ad58412cbaa665ed9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"Debug.Log(\"$1\");", | |
], | |
"description": "Log output to console" | |
}, | |
"Print to console a variable": { | |
"prefix": "vlog", | |
"body": [ | |
"Debug.Log($1);", | |
], | |
"description": "Log variable output to console" | |
}, | |
"Print variable to console": { | |
"prefix": "clog", | |
"body": [ | |
"Debug.Log($\"$CLIPBOARD => {$CLIPBOARD}\");", | |
], | |
"description": "Log cliboard to console, ex: Debug.Log($'position => {position}');" | |
}, | |
"Print to console $": { | |
"prefix": "$log", | |
"body": [ | |
"Debug.Log($\"$1\");", | |
], | |
"description": "Log output to console with string interpolation" | |
}, | |
"Vector3": { | |
"prefix": "v3", | |
"body": [ | |
"Vector3", | |
], | |
"description": "Vector3" | |
}, | |
"Vector2": { | |
"prefix": "v2", | |
"body": [ | |
"Vector2", | |
], | |
"description": "Vector2" | |
}, | |
"Unity Profiler Sample": { | |
"prefix": "_pr", | |
"body": [ | |
"UnityEngine.Profiling.Profiler.BeginSample(\"$1\");", | |
"${TM_SELECTED_TEXT}", | |
"UnityEngine.Profiling.Profiler.EndSample();" | |
], | |
"description": "Surround selection for profiling" | |
}, | |
"Wrap in function": { | |
"prefix": "_(", | |
"body": [ | |
"$1(${TM_SELECTED_TEXT})", | |
], | |
"description": "Surround selection with braces" | |
}, | |
"OnGui ClipboardLabel": { | |
"prefix": "OnGUIClipLabel", | |
"body": [ | |
"private void OnGUI()", | |
"{", | |
"\tvar defaultMatrix = GUI.matrix;", | |
"\tGUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one * (720 / Screen.height));", | |
"", | |
"\tGUI.Label(new Rect(5, 5 + 20 * 0, 200, 20), $\"$CLIPBOARD: {$CLIPBOARD}\");", | |
"", | |
"\tGUI.matrix = defaultMatrix;", | |
"}", | |
], | |
"description": "Add OnGUI function with clipboard as label" | |
}, | |
"Big separator": { | |
"prefix": "bsep", | |
"description": "Big comment separator", | |
"body": "// =============================================================\n$1" | |
}, | |
"Small separator": { | |
"prefix": "ssep", | |
"description": "Small comment separator", | |
"body": "// ================\n$1" | |
}, | |
"Separator": { | |
"prefix": "sep", | |
"description": "Comment separator", | |
"body": "// ------------------------------------\n$1" | |
} | |
// Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", | |
// "$2" | |
// ], | |
// "description": "Log output to console" | |
// } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment