{"id":21679904,"url":"https://github.com/kleber-swf/vscode-unity-code-snippets","last_synced_at":"2025-04-14T00:09:52.206Z","repository":{"id":25770738,"uuid":"106449139","full_name":"kleber-swf/vscode-unity-code-snippets","owner":"kleber-swf","description":"All snippets you need for Unity development in VSCode","archived":false,"fork":false,"pushed_at":"2024-07-20T08:34:12.000Z","size":1579,"stargazers_count":60,"open_issues_count":7,"forks_count":44,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-01-14T14:09:31.129Z","etag":null,"topics":["csharp","development","unity","vscode","vscode-extension","vscode-snippets"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=kleber-swf.unity-code-snippets","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kleber-swf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-10T17:27:45.000Z","updated_at":"2024-11-08T12:50:09.000Z","dependencies_parsed_at":"2025-01-14T14:09:03.654Z","dependency_job_id":"05042339-9ab8-48a0-9438-4be1e1e1b5bd","html_url":"https://github.com/kleber-swf/vscode-unity-code-snippets","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleber-swf%2Fvscode-unity-code-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleber-swf%2Fvscode-unity-code-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleber-swf%2Fvscode-unity-code-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleber-swf%2Fvscode-unity-code-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kleber-swf","download_url":"https://codeload.github.com/kleber-swf/vscode-unity-code-snippets/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234997357,"owners_count":18919643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","development","unity","vscode","vscode-extension","vscode-snippets"],"created_at":"2024-11-25T15:13:34.830Z","updated_at":"2025-01-21T18:10:00.781Z","avatar_url":"https://github.com/kleber-swf.png","language":"TypeScript","funding_links":[],"categories":["Game Development"],"sub_categories":["Unity Engine: Resources"],"readme":"# Unity Code Snippets\n\nCreate Unity classes and methods easily.\n\n![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/kleber-swf.unity-code-snippets?color=red\u0026style=for-the-badge)\n![Visual Studio Marketplace Rating (Stars)](https://img.shields.io/visual-studio-marketplace/stars/kleber-swf.unity-code-snippets?color=blue\u0026style=for-the-badge)\n![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/kleber-swf.unity-code-snippets?color=orange\u0026style=for-the-badge)\n\n## Features\n\n\u003e **2.0.0**: Support to style configuration. Now you can use [K\u0026R](https://en.wikipedia.org/wiki/Indentation_style#K\u0026R_style) and [Allman (C#/Unity default)](https://en.wikipedia.org/wiki/Indentation_style#Allman_style) styles! More at [Configuration](#configuration) section.\n\nAll the Unity code snippets you need. This extension intends to be the complete collection of Unity snippets for Visual Studio Code.\n\nIt takes advantage of latest Visual Studio Code snippets features to create the code faster for you.\n\n### MonoBehaviour\n\nCreate game classes like `MonoBehaviours`, `NetworkBehaviours` and `StateMachineBehaviours` easily. Also create common methods like `Start()`, `Update()` or `OnTriggerEnter2D()` and log calls.\n\n![MonoBehaviour](./images/usage-01.gif)\n\n### Editor\n\nCreate Editor classes like `Editor`, `EditorWindow` and `PropertyDrawer` as easy as it can be.\n\n![Unity Editor](./images/usage-02.gif)\n\n### ScriptableObject\n\nYou never remember the property that goes with the `ScriptableObject` to create it via Unity create menu? Not a problem.\n\n![ScriptableObject](./images/usage-03.gif)\n\n## Installation\n\nAs in any Visual Studio Code Extension you have several options to install:\n\n-  Enter the Visual Studio Code Marketplace, search for _Unity Code Snippets_ (or enter directly on [the extension page](https://marketplace.visualstudio.com/items?itemName=kleber-swf.unity-code-snippets)) and click on _Install_ button.\n-  Inside Visual Studio Code, enter in the Extensios panel, search for _Unity Code Snippets_ and click on _Install_ button\n-  Run the following command in the Command Palette:\n   ```\n   ext install kleber-swf.unity-code-snippets\n   ```\n\n## Configuration\n\nStarting at version `2.0.0` the extension is configurable.\n\nTo configure the extension, open VSCode Settings and search for \"Unity Code Snippets\". Note that after changing any of the settings, you need to restart VSCode to apply them to the snippets.\n\n### Style\n\nThe [indentation style](https://en.wikipedia.org/wiki/Indentation_style) for the snippets. For now you can choose between [K\u0026R](https://en.wikipedia.org/wiki/Indentation_style#K\u0026R_style) (the default for 1.x version) and [Allman](https://en.wikipedia.org/wiki/Indentation_style#Allman_style) (default to C#/Unity). If you need a different one, please leave an issue or upvote an existing one at the [project issues bord](https://github.com/kleber-swf/vscode-unity-code-snippets/issues). Default: `K\u0026R`.\n\n#### K\u0026R style\n\n![K\u0026R Indentation style](./images/kr.png)\n\n#### Allman style\n\n![Allman Indentation style](./images/allman.png)\n\n### Use Private Keyword\n\nAdds the `private` accessor keyword to private members. Default: `true`.\n\n#### No private keyword\n\n![No private keyword](./images/no-private.png)\n\n### Auto Complete: Classes\n\nAuto complete classes like `MonoBehaviour` and `Editor`.\n\n### Auto Complete: Methods\n\nAuto complete methods like `Start` and `OnCollisionEnter`.\n\n### Auto Complete: Calls\n\nAuto complete utility calls like `Debug.Log` and `Debug.DrawLine`.\n\n### Auto Complete: Attributes\n\nAuto complete attributes like `[SerializeField]` and `[RequireComponent]` (just these two for now).\n\n### Auto Complete: Experimental Attributes\n\nAuto complete all other attributes like `[HideInInspector]` and `[ContextMenu]`. There are a lot o attributes and this can pollute your Intellisense popup.\n\n## All the snippets\n\nStart typing the names to create the corresponding snippet. Some of them have a special snippet to not mess up with the default Intellisense behavior.\n\nSnippets are devided in categories, all of them can be enabled/disabled in the options.\n\n-  Classes:\n\n   -  Game Classes:\n      -  `MonoBehaviour`\n      -  `StateMachineBehaviour`\n      -  `NetworkBehaviour`\n      -  `ScriptableObject`\n   -  Editor Classes:\n      -  `Editor`\n      -  `EditorWithReorderableList`\n      -  `EditorWindow`\n      -  `PropertyDrawer`\n      -  `ScriptableWizard`\n   -  Standard Classes:\n      -  `class`\n      -  `interface`\n\n-  MonoBehaviour Methods:\n\n   -  `Awake()`\n   -  `FixedUpdate()`\n   -  `LateUpdate()`\n   -  `OnAnimatorIK()`\n   -  `OnAnimatorMove()`\n   -  `OnApplicationFocus()`\n   -  `OnApplicationPause()`\n   -  `OnApplicationQuit()`\n   -  `OnAudioFilterRead()`\n   -  `OnBecameInvisible()`\n   -  `OnBecameVisible()`\n   -  `OnCollisionEnter()`\n   -  `OnCollisionEnter2D()`\n   -  `OnCollisionExit()`\n   -  `OnCollisionExit2D()`\n   -  `OnCollisionStay()`\n   -  `OnCollisionStay2D()`\n   -  `OnConnectedToServer()`\n   -  `OnControllerColliderHit()`\n   -  `OnDestroy()`\n   -  `OnDisable()`\n   -  `OnDisconnectedFromServer()`\n   -  `OnDrawGizmos()`\n   -  `OnDrawGizmosSelected()`\n   -  `OnEnable()`\n   -  `OnFailedToConnect()`\n   -  `OnFailedToConnectToMasterServer()`\n   -  `OnFocus()`\n   -  `OnGUI()`\n   -  `OnHierarchyChange()`\n   -  `OnInspectorUpdate()`\n   -  `OnJointBreak()`\n   -  `OnJointBreak2D()`\n   -  `OnLostFocus()`\n   -  `OnMasterServerEvent()`\n   -  `OnMouseDown()`\n   -  `OnMouseDrag()`\n   -  `OnMouseEnter()`\n   -  `OnMouseExit()`\n   -  `OnMouseOver()`\n   -  `OnMouseUp()`\n   -  `OnMouseUpAsButton()`\n   -  `OnNetworkInstantiate()`\n   -  `OnParticleCollision()`\n   -  `OnParticleSystemStopped()`\n   -  `OnParticleTrigger()`\n   -  `OnPlayerConnected()`\n   -  `OnPlayerDisconnected()`\n   -  `OnPostRender()`\n   -  `OnPreCull()`\n   -  `OnPreRender()`\n   -  `OnProjectChange()`\n   -  `OnRenderImage()`\n   -  `OnRenderObject()`\n   -  `OnSceneGUI()`\n   -  `OnSelectionChange()`\n   -  `OnSerializeNetworkView()`\n   -  `OnServerInitialized()`\n   -  `OnStateEnter()`\n   -  `OnStateExit()`\n   -  `OnStateIK()`\n   -  `OnStateMove()`\n   -  `OnStateUpdate()`\n   -  `OnTransformChildrenChanged()`\n   -  `OnTransformParentChanged()`\n   -  `OnTriggerEnter()`\n   -  `OnTriggerEnter2D()`\n   -  `OnTriggerExit()`\n   -  `OnTriggerExit2D()`\n   -  `OnTriggerStay()`\n   -  `OnTriggerStay2D()`\n   -  `OnValidate()`\n   -  `OnWillRenderObject()`\n   -  `OnWizardCreate()`\n   -  `OnWizardOtherButton()`\n   -  `OnWizardUpdate()`\n   -  `Reset()`\n   -  `Start()`\n   -  `Update()`\n\n-  Calls:\n\n   -  `Debug.Log()` (type _`log`_)\n   -  `Debug.LogError()` (type _`logerror`_)\n   -  `Debug.LogException()` (type _`logexception`_)\n   -  `Debug.LogWarning()` (type _`logwarning`_)\n   -  `Debug.LogFormat()` (type _`logformat`_)\n   -  `Debug.LogErrorFormat()` (type _`logerrorformat`_)\n   -  `Debug.LogWarningFormat()` (type _`logwarningformat`_)\n   -  `Debug.DrawLine()` (type _`drawline`_)\n   -  `Debug.DrawRay()` (type _`drawray`_)\n\n-  Attributes:\n\n   -  `[SerializeField]` (type _`sfield`_)\n   -  `[RequireComponent]`\n\n-  Experimental snippets:\n   -  `[AddComponentMenu]`\n   -  `[AssemblyIsEditorAssembly]`\n   -  `[BeforeRenderOrder]`\n   -  `[CanEditMultipleObjects]`\n   -  `[ColorUsage]`\n   -  `[ContextMenu]`\n   -  `[ContextMenuItem]`\n   -  `[CreateAssetMenu]`\n   -  `[CustomEditor]`\n   -  `[CustomEditorForRenderPipeline]`\n   -  `[CustomGridBrush]`\n   -  `[CustomPreview]`\n   -  `[CustomPropertyDrawer]`\n   -  `[Delayed]`\n   -  `[DisallowMultipleComponent]`\n   -  `[DrawGizmo]`\n   -  `[EditorWindowTitle]`\n   -  `[ExcludeFromObjectFactory]`\n   -  `[ExcludeFromPreset]`\n   -  `[ExecuteAlways]`\n   -  `[ExecuteInEditMode]`\n   -  `[FilePath]`\n   -  `[GradientUsage]`\n   -  `[GUITarget]`\n   -  `[Header]`\n   -  `[HelpURL]`\n   -  `[HideInCallstack]`\n   -  `[HideInInspector]`\n   -  `[Icon]`\n   -  `[ImageEffectAfterScale]`\n   -  `[ImageEffectAllowedInSceneView]`\n   -  `[ImageEffectOpaque]`\n   -  `[ImageEffectTransformsToLDR]`\n   -  `[ImageEffectUsesCommandBuffer]`\n   -  `[InitializeOnEnterPlayMode]`\n   -  `[InitializeOnLoad]`\n   -  `[InitializeOnLoadMethod]`\n   -  `[InspectorName]`\n   -  `[InspectorOrder]`\n   -  `[LightingExplorerExtension]`\n   -  `[Localization]`\n   -  `[MenuItem]`\n   -  `[Min]`\n   -  `[Multiline]`\n   -  `[NonReorderable]`\n   -  `[PreferBinarySerialization]`\n   -  `[Range]`\n   -  `[RuntimeInitializeOnLoadMethod]`\n   -  `[SelectionBase]`\n   -  `[SerializeReference]`\n   -  `[SettingsProvider]`\n   -  `[SettingsProviderGroup]`\n   -  `[SharedBetweenAnimators]`\n   -  `[Space]`\n   -  `[TextArea]`\n   -  `[Tooltip]`\n\nIf 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.\n\nIf you like the color theme of the previews, you can download it here: [Base16 Ocean Dark Extended Theme](https://marketplace.visualstudio.com/items?itemName=kleber-swf.ocean-dark-extended).\n\nThank you for downloading this extension.\n\nIf you like the extension, please rate it with 5⭐. And, if you are feeling especially kind today, also leave a kind comment: [Review this Extension](https://marketplace.visualstudio.com/items?itemName=kleber-swf.unity-code-snippets\u0026ssr=false#review-details).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleber-swf%2Fvscode-unity-code-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleber-swf%2Fvscode-unity-code-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleber-swf%2Fvscode-unity-code-snippets/lists"}