VS常用snippet

1.head


<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>headTitle>
            <Shortcut>headShortcut>
            <Description>创建注释的代码片段Description>
            <Author>WXAuthor>
            <SnippetTypes>
                <SnippetType>ExpansionSnippetType>
            SnippetTypes>
        Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>DescriptionID>
                    <ToolTip>功能ToolTip>
                     <Default>描述Default>
                Literal>
                <Literal>
                    <ID>AuthorID>
                    <ToolTip>作者ToolTip>
                    <Default>WXDefault>
                Literal>
                <Literal>
                    <ID>CreateTimeID>
                    <ToolTip>创建日期ToolTip>
                     <Default>@@TodayDefault>
                Literal>
            
            Declarations>
            <Code Language="csharp">
            Code>
        Snippet>
    CodeSnippet>
CodeSnippets>

2.Debug.Log


<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>dlTitle>
			<Shortcut>dlShortcut>
			<Description>Debug.Log 的代码片段Description>
			<Author>WXAuthor>
			<SnippetTypes>
				<SnippetType>ExpansionSnippetType>
			SnippetTypes>
		Header>
		<Snippet>
			<Declarations>
				<Literal Editable="false">
					<ID>Debug.LogID>
					<Function>SimpleTypeName(global::UnityEngine.Debug.Log)Function>
				Literal>
			Declarations>
			<Code Language="csharp">
			Code>
		Snippet>
	CodeSnippet>
CodeSnippets>

3.method


<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>methodTitle>
            <Shortcut>methodShortcut>
            <Description>methodDescription>
            <Author>WXAuthor>
            <SnippetTypes>
                <SnippetType>ExpansionSnippetType>
                <SnippetType>SurroundsWithSnippetType>
            SnippetTypes>
        Header>
        <Snippet>
            <Declarations>
			    <Literal>
                    <ID>OpennessID>
                    <Default>publicDefault>
                    <ToolTip>公开性ToolTip>
                Literal>
                <Literal>
                    <ID>returnID>
                    <Default>voidDefault>
                    <ToolTip>返回类型ToolTip>
                Literal>
                <Literal>
                    <ID>methodID>
                    <Default>MyMethodDefault>
                    <ToolTip>方法名称ToolTip>
                Literal>
            Declarations>
            <Code Language="csharp">
            Code>
        Snippet>
    CodeSnippet>
CodeSnippets>

你可能感兴趣的:(unity)