mirror of
https://github.com/focus-creative-games/hybridclr_unity.git
synced 2026-11-20 15:42:40 +08:00
47622bf49c
[fix] 修复tvOS平台使用了错误的Unity-iPhone.xcodeproj路径导致找不到project.pbxproj的bug
26 lines
709 B
C#
26 lines
709 B
C#
using System;
|
|
using System.IO;
|
|
using UnityEditor.Build;
|
|
|
|
namespace HybridCLR.Editor.BuildProcessors
|
|
{
|
|
|
|
public static class BuildProcessorUtil
|
|
{
|
|
|
|
public static string GetXcodeProjectFile(string pathToBuiltProject)
|
|
{
|
|
foreach (string dir in Directory.GetDirectories(pathToBuiltProject, "*.xcodeproj", SearchOption.TopDirectoryOnly))
|
|
{
|
|
string pbxprojFile = $"{dir}/project.pbxproj";
|
|
if (File.Exists(pbxprojFile))
|
|
{
|
|
return pbxprojFile;
|
|
}
|
|
}
|
|
throw new BuildFailedException($"can't find xxxx.xcodeproj/project.pbxproj in {pathToBuiltProject}");
|
|
}
|
|
}
|
|
}
|
|
|