unity3d - unity Vuforia NullReferenceException

标签 unity3d nullreferenceexception vuforia hololens

我正在使用 Untiy 使用 Vuforia 为 HoloLens 构建 AR 应用程序。
我正在使用标记来放置多个对象以引用标记位置。没什么了不起的。还没有写脚本。
不时弹出以下错误消息。我不知道是什么导致它发生。我无法了解我在团结中所做的事情的上下文。此外,即使存在错误消息,构建也会成功。
怎么可能把它弄走?我什至无法理解它的重要性,因为对应用程序没有明显影响。

我怀疑是唯一的原因:在错误发生前不久我更新了 Vuforia。有可能是这个原因吗?

NullReferenceException: Object reference not set to an instance of an object
Vuforia.EditorClasses.ImageTargetEditor.DrawPredefinedTargetInspectorUI (Boolean typeChanged)
Vuforia.EditorClasses.ImageTargetEditor.OnInspectorGUI ()
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1295)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

编辑:
这不是 What is a NullReferenceException, and how do I fix it? 的副本因为异常的含义是已知的。
我不知道 Exceptions 的原因是什么以及如何统一修复它,因为它起源于不是我编写的代码。

最佳答案

你能告诉我你使用的 Vuforia SDK 是什么版本吗?

此错误的一种可能性是,您使用的 Vuforia SDK 版本不支持 Unity 版本(在本例中为 5.6.1f3)。

我建议将您的 Vuforia SDK(如果不一样)更新到最新版本(现在是 v6.2.10)。您可以在这里下载。

此外,我建议最初在一个空项目中打开 SDK,因为当您尝试将 SDK 导入现有项目时,如果任何脚本出现编译错误,就会发生这种情况,

关于unity3d - unity Vuforia NullReferenceException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51300737/

相关文章:

c# - 如何在 Unity 中全局为类创建别名?

c# - 输入管理器 2 个播放器和 2 个 Controller

r - R 中的错​​误消息 "attempt to set an attribute on NULL"

asp.net-mvc - ASP.Net MVC RC2 ValidationMessage 和表单字段冲突?

c# - 统一: Texturing a Shoreline in a Hexgrid

c# - 如何在运行时刷新 Unity?

c++ - "Read Access Violation: This was nullptr"以为我正确分配了它......?

unity3d - 如何在 Unity 上结合 Cardboard VR + Vuforia AR 插件?

ios - 扩展投影矩阵

iOS 使用 vImage - 加速将 QCAR YUV 转换为 RGB