VS Code Snippets
NEW: Support for automatic namespace insertion for all snippets! When you insert a snippet, the namespace will be automatically added to the top of your file.
For a full list of all snippets included in SuperBehaviour for Unity, please refer to the table below. The table includes the snippet name, the class/function it applies to, and the snippet prefix used to insert it into your code.
Behaviours:
- SuperBehaviour [Unity]: MonoBehaviour, SuperBehaviour
- SingletonBehaviour [Unity]: SingletonBehaviour, SuperBehaviourSingleton
- SingletonBehaviour DDOL [Unity]: SingletonBehaviourDontDestroyOnLoad
- StateMachineBehaviour [Unity]: StateMachineBehaviour
- NetworkBehaviour [Unity]: NetworkBehaviour
ScriptableObjects:
- ScriptableObject [Unity]: ScriptableObject
Class:
- Class [C#]: class, publicclass, classpublic
- Class (private) [C#]: classprivate, privateclass
- Class (static) [C#]: classstatic, staticclass
- Class (abstract) [C#]: classabstract, abstractclass
- Class (generic) [C#]: classgeneric, genericclass
Interface:
- Interface [C#]: interface
Struct:
- Struct [C#]: struct
Enum:
- Enum [C#]: enum
- Enum (flags) [C#]: enumflags
- Enum With Extension Class [C#]: enumwithextension
- Enum (extension) [C#]: enumextension
Editor:
- Editor [Unity Editor]: SuperEditor, Editor, Inspector
- Editor with Field List [Unity Editor]: EditorFieldList, InspectorFieldList
- Editor with Property List [Unity Editor]: EditorPropertyList, InspectorPropertyList
- EditorWindow [Unity Editor]: EditorWindow
- PropertyDrawer [Unity Editor]: PropertyDrawer
- ScriptableWizard [Unity Editor]: ScriptableWizard
MonoBehaviour Functions:
- Singleton [MonoBehaviour]: _Singleton()
- Awake [MonoBehaviour]: Awake()
- FixedUpdate [MonoBehaviour]: FixedUpdate()
- LateUpdate [MonoBehaviour]: LateUpdate()
- OnAnimatorIK [MonoBehaviour]: OnAnimatorIK(int)
- OnAnimatorMove [MonoBehaviour]: OnAnimatorMove()
- OnApplicationFocus [MonoBehaviour]: OnApplicationFocus(bool)
- OnApplicationPause [MonoBehaviour]: OnApplicationPause(bool)
- OnApplicationQuit [MonoBehaviour]: OnApplicationQuit()
- OnAudioFilterRead [MonoBehaviour]: OnAudioFilterRead(float[], int)
- OnBecameInvisible [MonoBehaviour]: OnBecameInvisible()
- OnBecameVisible [MonoBehaviour]: OnBecameVisible()
- OnCollisionEnter [MonoBehaviour]: OnCollisionEnter(Collision)
- OnCollisionEnter2D [MonoBehaviour]: OnCollisionEnter2D(Collision2D)
- OnCollisionExit [MonoBehaviour]: OnCollisionExit(Collision)
- OnCollisionExit2D [MonoBehaviour]: OnCollisionExit2D(Collision2D)
- OnCollisionStay [MonoBehaviour]: OnCollisionStay(Collision)
- OnCollisionStay2D [MonoBehaviour]: OnCollisionStay2D(Collision2D)
- OnConnectedToServer [MonoBehaviour]: OnConnectedToServer()
- OnControllerColliderHit [MonoBehaviour]: OnControllerColliderHit(ControllerColliderHit)
- OnDestroy [MonoBehaviour]: OnDestroy()
- OnDisable [MonoBehaviour]: OnDisable()
- OnDisconnectedFromServer [MonoBehaviour]: OnDisconnectedFromServer(NetworkDisconnection)
- OnDrawGizmos [MonoBehaviour]: OnDrawGizmos()
- OnDrawGizmosSelected [MonoBehaviour]: OnDrawGizmosSelected()
- OnEnable [MonoBehaviour]: OnEnable()
- OnFailedToConnect [MonoBehaviour]: OnFailedToConnect(NetworkConnectionError)
- OnFailedToConnectToMasterServer [MonoBehaviour]: OnFailedToConnectToMasterServer(NetworkConnectionError)
- OnGUI [MonoBehaviour]: OnGUI()
- OnJointBreak [MonoBehaviour]: OnJointBreak(float)
- OnJointBreak2D [MonoBehaviour]: OnJointBreak2D(Joint2D)
- OnMasterServerEvent [MonoBehaviour]: OnMasterServerEvent(MasterServerEvent)
- OnMouseDown [MonoBehaviour]: OnMouseDown()
- OnMouseDrag [MonoBehaviour]: OnMouseDrag()
- OnMouseEnter [MonoBehaviour]: OnMouseEnter()
- OnMouseExit [MonoBehaviour]: OnMouseExit()
- OnMouseOver [MonoBehaviour]: OnMouseOver()
- OnMouseUp [MonoBehaviour]: OnMouseUp()
- OnMouseUpAsButton [MonoBehaviour]: OnMouseUpAsButton()
- OnNetworkInstantiate [MonoBehaviour]: OnNetworkInstantiate(NetworkMessageInfo)
- OnParticleCollision [MonoBehaviour]: OnParticleCollision(GameObject)
- OnParticleSystemStopped [MonoBehaviour]: OnParticleSystemStopped()
- OnParticleTrigger [MonoBehaviour]: OnParticleTrigger()
- OnPlayerConnected [MonoBehaviour]: OnPlayerConnected(NetworkPlayer)
- OnPlayerDisconnected [MonoBehaviour]: OnPlayerDisconnected(NetworkPlayer)
- OnPostRender [MonoBehaviour]: OnPostRender()
- OnPreCull [MonoBehaviour]: OnPreCull()
- OnPreRender [MonoBehaviour]: OnPreRender()
- OnRenderImage [MonoBehaviour]: OnRenderImage(RenderTexture, RenderTexture)
- OnRenderObject [MonoBehaviour]: OnRenderObject()
- OnSerializeNetworkView [MonoBehaviour]: OnSerializeNetworkView(BitStream, NetworkMessageInfo)
- OnServerInitialized [MonoBehaviour]: OnServerInitialized()
- OnTransformChildrenChanged [MonoBehaviour]: OnTransformChildrenChanged()
- OnTransformParentChanged [MonoBehaviour]: OnTransformParentChanged()
- OnTriggerEnter [MonoBehaviour]: OnTriggerEnter(Collider)
- OnTriggerEnter2D [MonoBehaviour]: OnTriggerEnter2D(Collider2D)
- OnTriggerExit [MonoBehaviour]: OnTriggerExit(Collider)
- OnTriggerExit2D [MonoBehaviour]: OnTriggerExit2D(Collider2D)
- OnTriggerStay [MonoBehaviour]: OnTriggerStay(Collider)
- OnTriggerStay2D [MonoBehaviour]: OnTriggerStay2D(Collider2D)
- OnValidate [MonoBehaviour]: OnValidate()
- OnWillRenderObject [MonoBehaviour]: OnWillRenderObject()
- Reset [MonoBehaviour]: Reset()
- Start [MonoBehaviour]: Start()
- Update [MonoBehaviour]: Update()
StateMachineBehaviour Functions:
- OnStateEnter [StateMachineBehaviour]: OnStateEnter()
- OnStateExit [StateMachineBehaviour]: OnStateExit()
- OnStateIK [StateMachineBehaviour]: OnStateIK()
- OnStateMove [StateMachineBehaviour]: OnStateMove()
- OnStateUpdate [StateMachineBehaviour]: OnStateUpdate()
Editor Functions:
- OnSceneGUI [Editor]: OnSceneGUI()
- OnInspectorFieldsGUI [SuperEditor]: OnInspectorFieldsGUI()
- OnInspectorPropertiesGUI [SuperEditor]: OnInspectorPropertiesGUI()
EditorWindow Functions:
- OnFocus [EditorWindow]: OnFocus()
- OnHierarchyChange [EditorWindow]: OnHierarchyChange()
- OnInspectorUpdate [EditorWindow]: OnInspectorUpdate()
- OnLostFocus [EditorWindow]: OnLostFocus()
- OnProjectChange [EditorWindow]: OnProjectChange()
- OnSelectionChange [EditorWindow]: OnSelectionChange()
ScriptableWizard Functions:
- OnWizardCreate [ScriptableWizard]: OnWizardCreate()
- OnWizardOtherButton [ScriptableWizard]: OnWizardOtherButton()
- OnWizardUpdate [ScriptableWizard]: OnWizardUpdate()
Debug Functions:
- Debug Log: Log
- Debug Log Error: LogError
- Debug Log Warning: LogWarning
- Debug Log Exception: LogException
- Debug LogFormat: LogFormat
- Debug LogErrorFormat: LogErrorFormat
- Debug LogWarningFormat: LogWarningFormat
- Debug DrawLine: DrawLine
- Debug DrawRay: DrawRay
Basic C# Functions:
- Extension Method: Extension()
Unity Functions:
- Quit [Application]: QuitApplication()