Create Unity classes and methods easily.
With new line (Allman) style braces:
public class Foo
{
// awesome!
}
Forked from Cem Ugur Karacam. Original by Kleber Silva.
All the Unity code snippets you need. This extension intends to be the complete collection of Unity snippets for Visual Studio Code.
It takes advantage of latest Visual Studio Code snippets features to create the code faster for you.
Create game classes like MonoBehaviours
, NetworkBehaviours
and StateMachineBehaviours
easily. Also create common methods like Start()
, Update()
or OnTriggerEnter2D()
and log calls.
Create Editor classes like Editor
, EditorWindow
and PropertyDrawer
as easy as it can be.
You never remember the property that goes with the ScriptableObject
to create it via Unity create menu? Not a problem.
As in any Visual Studio Code Extension you have several options to install:
- Enter the Visual Studio Code Marketplace, search for Unity Code Snippets Newline (or enter directly on the extension page) and click on Install button.
- Inside Visual Studio Code, enter in the Extensios panel, search for Unity Code Snippets and click on Install button
- Run the following command in the Command Palette:
ext install Cdddo.unity-code-snippets-newline
Start typing the names to create the corresponding snippets.
-
Game classes:
MonoBehaviour
StateMachineBehaviour
NetworkBehaviour
ScriptableObject
-
Editor Classes:
Editor
Editor with Reorderable List
EditorWindow
PropertyDrawer
ScriptableWizard
-
MonoBehaviour Methods:
Awake()
FixedUpdate()
LateUpdate()
OnAnimatorIK()
OnAnimatorMove()
OnApplicationFocus()
OnApplicationPause()
OnApplicationQuit()
OnAudioFilterRead()
OnBecameInvisible()
OnBecameVisible()
OnCollisionEnter()
OnCollisionEnter2D()
OnCollisionExit()
OnCollisionExit2D()
OnCollisionStay()
OnCollisionStay2D()
OnConnectedToServer()
OnControllerColliderHit()
OnDestroy()
OnDisable()
OnDisconnectedFromServer()
OnDrawGizmos()
OnDrawGizmosSelected()
OnEnable()
OnFailedToConnect()
OnFailedToConnectToMasterServer()
OnGUI()
OnJointBreak()
OnJointBreak2D()
OnMasterServerEvent()
OnMouseDown()
OnMouseDrag()
OnMouseEnter()
OnMouseExit()
OnMouseOver()
OnMouseUp()
OnMouseUpAsButton()
OnNetworkInstantiate()
OnParticleCollision()
OnParticleSystemStopped()
OnParticleTrigger()
OnParticleUpdateJobScheduled()
OnPlayerConnected()
OnPlayerDisconnected()
OnPostRender()
OnPreCull()
OnPreRender()
OnRenderImage()
OnRenderObject()
OnSerializeNetworkView()
OnServerInitialized()
OnTransformChildrenChanged()
OnTransformParentChanged()
OnTriggerEnter()
OnTriggerEnter2D()
OnTriggerExit()
OnTriggerExit2D()
OnTriggerStay()
OnTriggerStay2D()
OnValidate()
OnWillRenderObject()
Reset()
Start()
Update()
-
Debug snippets:
Debug.Log()
(typelog
)Debug.LogError()
(typelogerror
)Debug.LogWarning()
(typelogwarning
)Debug.LogException()
(typelogexception
)Debug.DrawLine()
Debug.DrawRay()
If you have any suggestions or problems, open an issue in the Github project page or do a Pull Request.
Thank you for downloading this extension.