Skip to content

Commit

Permalink
Fix issue with broken Unity build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Miller committed Jan 31, 2018
1 parent 552e61c commit 33d6ac5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Sources/UBKit/Files/Unity/UnityEditorBuildScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ extension File {
playerOptions.options = BuildOptions.None;
BuildPipeline.BuildPlayer (playerOptions);
CopyDataFolderReference (outputLocation);
}
private static void CopyDataFolderReference (string folderRootPath) {
var pbx = new PBXProject();
var pbxPath = Path.Combine(iOSProjectRoot, PbxFilePath);
pbx.ReadFromFile(pbxPath);
var folderGuid = pbx.AddFolderReference(Path.Combine(outputLocation, "Data"), Path.Combine(iOSProjectRoot, DataProjectPath), PBXSourceTree.Absolute);
var folderGuid = pbx.AddFolderReference(Path.Combine(folderRootPath, "Data"), Path.Combine(iOSProjectRoot, DataProjectPath), PBXSourceTree.Absolute);
var targetGiud = pbx.TargetGuidByName(iOSProjectName);
var resourceGiud = pbx.GetResourcesBuildPhaseByTarget(targetGiud);
pbx.AddFileToBuildSection(targetGiud, resourceGiud, folderGuid);
Expand Down
1 change: 0 additions & 1 deletion Sources/UBKit/Workers/UnityProject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ private extension UnityProject {
UnityCommandLine.buildAction,
UnityCommandLine.Arguments.quit,
terminationHandler: { (process) in
print(process.terminationStatus)
statusCode = process.terminationStatus
semaphore.signal()
})
Expand Down

0 comments on commit 33d6ac5

Please sign in to comment.