-
Notifications
You must be signed in to change notification settings - Fork 0
/
UnityPropertyGlobalName.snippet
40 lines (39 loc) · 1.14 KB
/
UnityPropertyGlobalName.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Shortcut>upropgn</Shortcut>
<Title>UnityPropertyGlobalName</Title>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<Default>roperty</Default>
<ID>property</ID>
</Literal>
<Literal Editable="true">
<Default>p</Default>
<ID>lower</ID>
</Literal>
<Literal Editable="true">
<Default>P</Default>
<ID>upper</ID>
</Literal>
<Literal Editable="true">
<Default>public</Default>
<ID>access</ID>
</Literal>
<Literal Editable="true">
<Default>name</Default>
<ID>name</ID>
</Literal>
</Declarations>
<Code Language="CSharp"><![CDATA[GameObject $lower$$property$Cache;
$access$ GameObject $upper$$property$
{
get { return $lower$$property$Cache ? $lower$$property$Cache : ($lower$$property$Cache = GameObject.Find("$name$")); }
}
$end$]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>