gpt4 book ai didi

ios - Unity Vuforia Xcode 构建错误 : "Undefined symbols for architecture arm64"

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:14:29 26 4
gpt4 key购买 nike

我目前正在尝试在 Xcode 中构建一个项目(以前工作过)。这是一个使用 Vuforia 插件的 Unity 项目,它可以完美地构建到 Android。

在 Xcode 中构建时,我收到以下错误消息:

    Undefined symbols for architecture arm64:
"_UnityRenderBufferMTLTexture", referenced from:
PlatformiOS::setRenderBuffers(void*) in libVuforiaUnityPlayer.a(PlatformiOS.o)
"_UnityCurrentMTLCommandEncoder", referenced from:
PlatformiOS::setRenderBuffers(void*) in libVuforiaUnityPlayer.a(PlatformiOS.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我在项目中包含了 Security.framework 和 SystemConfiguration.framework。

统一 5.5.0f3; Vuforia SDK v5.5.9; XCode 8.2.1

最佳答案

我通过更新 Unity 项目中的 Vuforia 解决了这个问题,尽管在更新之前我没有删除 Plugins 文件夹中的 Vuforia 文件。我之前尝试对 Vuforia 进行适当的更新,但失败了。

所以步骤:1 - 删除 Assets /Vuforia

2 - 将 VuforiaCamera.cs (Assets/Scripts/Vuforia) 更新为以下代码

3 - 导入最新的 Vuforia 包

4 - 利润!

public class VuforiaCamera : MonoBehaviour
{
private bool mVuforiaStarted = false;

void Start()
{
VuforiaARController vuforia = VuforiaARController.Instance;

if (vuforia != null)
vuforia.RegisterVuforiaStartedCallback(StartAfterVuforia);
}

private void StartAfterVuforia()
{
mVuforiaStarted = true;
SetAutofocus();
}

void OnApplicationPause(bool pause)
{
if (!pause)
{
// App resumed
if (mVuforiaStarted)
{
// App resumed and vuforia already started
// but lets start it again...
SetAutofocus(); // This is done because some android devices lose the auto focus after resume
// this was a bug in vuforia 4 and 5. I haven't checked 6, but the code is harmless anyway
}
}
}

private void SetAutofocus()
{
if (CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO))
{
Debug.Log("Autofocus set");
}
else
{
// never actually seen a device that doesn't support this, but just in case
Debug.Log("this device doesn't support auto focus");
}
}
}

关于ios - Unity Vuforia Xcode 构建错误 : "Undefined symbols for architecture arm64",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42221422/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com