「Unity/バージョンアップメモ/unity2022.3.11f1」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→PostProcess対応) |
(→Assertion failedエラー) |
||
行8: | 行8: | ||
参考:https://developer.apple.com/forums/thread/735426 | 参考:https://developer.apple.com/forums/thread/735426 | ||
+ | |||
+ | ちなみに、"-ld64"は非推奨。 | ||
===PostProcess対応=== | ===PostProcess対応=== |
2023年10月28日 (土) 06:00時点における版
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
ちなみに、"-ld64"は非推奨。
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)); } }