-
Notifications
You must be signed in to change notification settings - Fork 0
/
UnityPropertyComponent6.snippet
37 lines (36 loc) · 1.13 KB
/
UnityPropertyComponent6.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
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Shortcut>upropc6</Shortcut>
<Title>UnityPropertyComponent6</Title>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<Default>Component</Default>
<ID>component</ID>
</Literal>
<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>
</Declarations>
<Code Language="CSharp"><![CDATA[$component$ $lower$$property$Cache;
$access$ $component$ $upper$$property$ => $lower$$property$Cache ? $lower$$property$Cache : ($lower$$property$Cache = GetComponent<$component$>());
$end$]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>