AR Foundation演示项目,使用 AR Foundation 4.1.7 并围绕某些功能演示更高级功能。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

32 行
1.0 KiB

using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class IosAppendExceptionFix : IPreprocessBuildWithReport
{
public int callbackOrder => 0;
public void OnPreprocessBuild(BuildReport report)
{
if (report.summary.platform != BuildTarget.iOS)
return;
var buildPath = report.summary.outputPath;
var catalogPath = Path.Combine(buildPath, "Unity-iPhone", "Images.xcassets");
if (!Directory.Exists(catalogPath)) {
Debug.LogError("Could not find assets catalog at path: " + catalogPath);
return;
}
var launchimagePath = Path.Combine(catalogPath, "LaunchImage.launchimage");
if (Directory.Exists(launchimagePath)) {
// Nothing to do
return;
}
Debug.Log("Created LaunchImage.launchimage directory to work around exception during Unity iOS append builds");
Directory.CreateDirectory(launchimagePath);
}
}