Open citizenmatt opened 8 years ago
Debug.Log(""); Debug.LogFormat("", ); and warning, error variants
cpropg - lazy initialized component property in MonoBehavior, I use this a lot...
private Component component;
public Component Component
{
get
{
if (component == null)
{
component = GetComponent<Component>();
}
return component;
}
}
sf - create a private field with [SerializeField] attribute.
I'm after suggestions for adding live/file/surround templates. I've come up with:
mb
- create a new class that derives fromMonoBehaviour
.MonoBehaviour class
- file template to create a new class that derives fromMonoBehaviour
.And er, that's it.
What else would be useful? What common code snippets would you reuse?
GetComponent
,InitializeOnLoadAttribute
?