-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16e7420
commit d630d3d
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEditor.Build; | ||
using UnityEditor.Build.Reporting; | ||
|
||
namespace OpenTS2 | ||
{ | ||
public class AFDKOBuildPostProcessor : IPostprocessBuildWithReport | ||
{ | ||
public int callbackOrder => 0; | ||
|
||
public void OnPostprocessBuild(BuildReport report) | ||
{ | ||
var buildPath = Path.GetDirectoryName(report.summary.outputPath); | ||
var afdkoFiles = Directory.GetFiles("afdko"); | ||
var afdkoOutputPath = Path.Combine(buildPath, "afdko"); | ||
if (Directory.Exists(afdkoOutputPath)) | ||
Directory.Delete(afdkoOutputPath, true); | ||
var dir = Directory.CreateDirectory(afdkoOutputPath); | ||
foreach(var file in afdkoFiles) | ||
{ | ||
File.Copy(file, Path.Combine(afdkoOutputPath, Path.GetFileName(file))); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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