Predefined Live Templates for Unity
This topic lists all predefined live templates for Unity in JetBrains Rider 2023.2. For more information about live templates, refer to Create source code using live templates.
Template | Details |
---|---|
| Current file context Scope Everywhere Body $CTX$ Parameters
|
| Insert new GUID Scope Everywhere Body $GUID$ Parameters
|
| Unity CreateAssetMenu attribute Scope C# 2.0+ types and namespaces, Unity C# file Body [UnityEngine.CreateAssetMenu(fileName = $FILENAME$, menuName = $MENUNAME$, order = $ORDER$)] Parameters
|
| Unity log warning Scope C# 2.0+ statements, Unity C# file Body UnityEngine.Debug.LogWarning($VAR$); Parameters
|
| Unity log exception Scope C# 2.0+ statements, Unity C# file Body UnityEngine.Debug.LogException($VAR$); Parameters
|
| Unity menu item handler Scope C# 2.0+ type members, Unity C# file Body [UnityEditor.MenuItem($MENUNAME$)]
public static void $NAME$()
{
$END$
} Parameters
|
| Unity serialized field Scope C# 2.0+ type members, Unity serializable type members Body [UnityEngine.SerializeField] private $TYPE$ $NAME$;$END$ Parameters
|
| Unity log error Scope C# 2.0+ statements, Unity C# file Body UnityEngine.Debug.LogError($VAR$); Parameters
|
| Unity log object/message Scope C# 2.0+ statements, Unity C# file Body UnityEngine.Debug.Log($VAR$); Parameters
|
| Unity RequireComponent attribute Scope C# 2.0+ types and namespaces, Unity C# file Body [UnityEngine.RequireComponent(typeof($TYPE$))] Parameters
|
| Unity property with serialized backing field Scope C# 2.0+ type members, Unity serializable type members Body [UnityEngine.SerializeField] private $type$ $fieldName$;
public $type$ $propertyName$ { get { return this.$fieldName$; } }$END$ Parameters
|
| Unity coroutine method Scope C# 2.0+ type members, Unity C# file Body private System.Collections.IEnumerator $NAME$()
{
$END$yield break;
} Parameters
|
| Unity log variable Scope C# 2.0+ statements, Unity C# file Body UnityEngine.Debug.Log("$VAR$ = " + $VAR$); Parameters
|