Created
November 26, 2014 13:16
-
-
Save jbevain/fc7da08167648381a1a7 to your computer and use it in GitHub Desktop.
Project Generation Hook to insert namespace in the project files
This file contains 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
using System; | |
using UnityEngine; | |
using UnityEditor; | |
using SyntaxTree.VisualStudio.Unity.Bridge; | |
[InitializeOnLoad] | |
public class NamespaceProjectHook | |
{ | |
private const string Namespace = "Foo.Bar"; | |
static NamespaceProjectHook() | |
{ | |
ProjectFilesGenerator.ProjectFileGeneration += (string name, string content) => | |
content.Replace("<RootNamespace></RootNamespace>", string.Format("<RootNamespace>{0}</RootNamespace>", Namespace)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment