Created
August 12, 2020 08:18
-
-
Save Nrjwolf/6979fa72739223c8a3a199ce08259827 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"Get/Set": { | |
"prefix": "Get/Set", | |
"body": [ | |
"[SerializeField]", | |
"private $TYPE m_$NAME;", | |
"public $TYPE $NAME", | |
"{", | |
" get => m_$NAME;", | |
" set", | |
" {", | |
" m_$NAME = value;", | |
" }", | |
"}" | |
], | |
"description": "Getter/Setter" | |
}, | |
"OnValidate": { | |
"prefix": "Validate", | |
"body": [ | |
"#if UNITY_EDITOR", | |
"void OnValidate()", | |
"{", | |
" if (!gameObject.activeInHierarchy)", | |
" return;", | |
" $1", | |
"}", | |
"#endif" | |
], | |
"description": "OnValidate with dependent compilation" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment