「Unity/バージョンアップメモ/unity2022.3.11f1」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→PostProcess対応) |
|||
行28: | 行28: | ||
project.ReadFromFile(PBXProject.GetPBXProjectPath(path)); | project.ReadFromFile(PBXProject.GetPBXProjectPath(path)); | ||
project.AddBuildProperty(project.GetUnityMainTargetGuid(), "OTHER_LDFLAGS", "-ld_classic"); | project.AddBuildProperty(project.GetUnityMainTargetGuid(), "OTHER_LDFLAGS", "-ld_classic"); | ||
− | |||
project.WriteToFile(PBXProject.GetPBXProjectPath(path)); | project.WriteToFile(PBXProject.GetPBXProjectPath(path)); | ||
} | } |
2023年10月28日 (土) 05:46時点における版
Assertion failedエラー
エラー詳細
Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
対策
- xcodeのBuildSettingで、PROJECT側のUnity-iPhoneの"Other Linker Flag"に"-ld_classic"を追加。
参考:https://developer.apple.com/forums/thread/735426
PostProcess対応
Assets/Editor/XcodeIdClassicPostProcess.cs
using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode; public static class XcodeIdClassicPostProcess { [PostProcessBuild] public static void OnPostProcessBuild(BuildTarget target, string path) { if (target != BuildTarget.iOS) { return; } var project = new PBXProject(); project.ReadFromFile(PBXProject.GetPBXProjectPath(path)); project.AddBuildProperty(project.GetUnityMainTargetGuid(), "OTHER_LDFLAGS", "-ld_classic"); project.WriteToFile(PBXProject.GetPBXProjectPath(path)); } }