facebook twitter hatena line email

Unity/バージョンアップメモ/unity2022.3.11f1

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

注意

このバージョンは、Android側のTMP_InputField選択時に、たまに、キーボードが出ない不具合がある。 この問題は、2022.3.9f1に戻すると、直る。https://forum.unity.com/threads/1521901/ 。この問題は、2022.3.20f1、2023.2.10f1まで、直ってなかったが、2022.3.21f1、2023.2.11f1で直ってた。

ただ、2022.3.9f1は、iOS側で、"Command PhaseScriptExecution failed with a nonzero exit code"のエラーが出る。 PhaseScriptExecutionのエラーは2022.3.11f1だと直る。

Assertion failedエラー

エラー詳細

Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

対策

  1. 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.GetUnityFrameworkTargetGuid(), "OTHER_LDFLAGS", "-ld_classic");
        project.WriteToFile(PBXProject.GetPBXProjectPath(path));
    }
}

参考:https://issuetracker.unity3d.com/issues/building-projects-with-il2cpp-scripting-backend-for-apple-platforms-fails-with-xcode-15-dot-0b6-or-newer