Created
July 17, 2018 07:12
-
-
Save HassakuTb/dc4851279da447dc6efd58b2bebcb1e9 to your computer and use it in GitHub Desktop.
CS Snippet GetComponent
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>getcomp</Title> | |
<Shortcut>getcomp</Shortcut> | |
<Description>dependency injection using Get Component</Description> | |
<Author></Author> | |
</Header> | |
<Snippet> | |
<Declarations> | |
<Literal Editable="true"> | |
<ID>type</ID> | |
<ToolTip>type of component</ToolTip> | |
<Default>Button</Default></Literal> | |
<Literal Editable="true"> | |
<ID>var</ID> | |
<ToolTip>Variable name</ToolTip> | |
<Default>button</Default></Literal> | |
</Declarations> | |
<Code Language="csharp"><![CDATA[$end$$var$ = GetComponent<$type$>();]]></Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment