VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
OnPostBuild.cs
1 using UnityEngine;
2 using UnityEditor;
3 using UnityEditor.Callbacks;
4 
5 using System;
6 using System.IO;
7 using System.Collections.Generic;
8 
9 public static class PostBuild
10 {
11  // Copy over settings files on build.
12  [PostProcessBuild]
13  static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
14  {
15  string[] files = System.IO.Directory.GetFiles(Application.dataPath + "/..", "*.avr", SearchOption.AllDirectories);
16 
17  foreach(string f in files) {
18  string dest_path = Path.GetDirectoryName(pathToBuiltProject) + "/" + Path.GetFileName(f);
19  FileUtil.DeleteFileOrDirectory(dest_path);
20  FileUtil.CopyFileOrDirectory(f, dest_path);
21  }
22  }
23 }
24 
Definition: OnPostBuild.cs:9
static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
Definition: OnPostBuild.cs:13