Example #1
0
        private static void VerifyAndCheckAssets(string currentPath, string assetFolder, string[] files)
        {
            string AssetsPath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "Templates", "Assets", assetFolder);

            Parsercsproj parserProj = new Parsercsproj(currentPath);
            foreach (string asset in files)
            {
                if (!File.Exists(Path.Combine(currentPath, "Assets", assetFolder, asset)))
                {
                    File.Copy(Path.Combine(AssetsPath, asset), Path.Combine(currentPath, "Assets", assetFolder, asset));
                    parserProj.AddContentFile("Assets\\" + assetFolder + "\\" + asset, CopyOutPutOptions.PreserveNewest);
                }
            }
            parserProj.Save();
        }