Skip to content

Commit ff05a57

Browse files
committed
add project path for visionOS
1 parent 3d14cc4 commit ff05a57

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Editor/LLMBuildProcessor.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ private void OnBuildError(string condition, string stacktrace, LogType type)
3030
/// <summary>
3131
/// Postprocess the iOS Build
3232
/// </summary>
33-
public static void PostprocessIOSBuild(string outputPath)
33+
public static void PostprocessIOSBuild(BuildTarget buildTarget, string outputPath)
3434
{
3535
string projPath = PBXProject.GetPBXProjectPath(outputPath);
36+
#if UNITY_VISIONOS
37+
projPath = projPath.Replace("Unity-iPhone", "Unity-VisionOS");
38+
#endif
3639
PBXProject project = new PBXProject();
3740
project.ReadFromFile(projPath);
3841

@@ -46,7 +49,7 @@ public static void PostprocessIOSBuild(string outputPath)
4649
project.AddFrameworkToProject(targetGuid, "Accelerate.framework", false);
4750

4851
// Remove libundreamai_ios.a from Embed Frameworks
49-
string libraryFile = Path.Combine("Libraries", LLMBuilder.PluginLibraryDir("iOS", true), "libundreamai_ios.a");
52+
string libraryFile = Path.Combine("Libraries", LLMBuilder.PluginLibraryDir(buildTarget.ToString(), true), $"libundreamai_{buildTarget.ToString().ToLower()}.a");
5053
string fileGuid = project.FindFileGuidByProjectPath(libraryFile);
5154
if (string.IsNullOrEmpty(fileGuid)) Debug.LogError($"Library file {libraryFile} not found in project");
5255
else
@@ -71,7 +74,7 @@ public static void PostprocessIOSBuild(string outputPath)
7174
public void OnPostprocessBuild(BuildReport report)
7275
{
7376
#if UNITY_IOS || UNITY_VISIONOS
74-
AddAccelerate(report.summary.outputPath);
77+
PostprocessIOSBuild(report.summary.platform, report.summary.outputPath);
7578
#endif
7679
BuildCompleted();
7780
}

0 commit comments

Comments
 (0)