Q&A
発生している問題・エラーメッセージ
Immersalが提供しているサンプルプロジェクトのうち、ContentPlacementSampleをビルドしようとすると以下の3つのエラーが発生します。エラーの解決方法についてご教授いただきたいです。
(ContentPlacementSampleについては、こちらの公式のドキュメントで解説されています。
https://immersal.gitbook.io/sdk/unity/sample-scenes/content-placement-sample )
ArgumentNullException: Value cannot be null. Parameter name: key System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <4ba27aa039714eafa1e8892e51af2932>:0) System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) (at <4ba27aa039714eafa1e8892e51af2932>:0) Immersal.AR.ARSpace.UnregisterSpace (UnityEngine.Transform tr, System.Int32 mapId) (at Assets/ImmersalSDK/Core/Scripts/AR/ARSpace.cs:220) Immersal.AR.ARMap.FreeMap (System.Boolean destroy) (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:167) Immersal.AR.ARMap.OnDisable () (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:462) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
ArgumentNullException: Value cannot be null. Parameter name: key System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <4ba27aa039714eafa1e8892e51af2932>:0) System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) (at <4ba27aa039714eafa1e8892e51af2932>:0) Immersal.AR.ARSpace.UnregisterSpace (UnityEngine.Transform tr, System.Int32 mapId) (at Assets/ImmersalSDK/Core/Scripts/AR/ARSpace.cs:220) Immersal.AR.ARMap.FreeMap (System.Boolean destroy) (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:167) Immersal.AR.ARMap.OnDestroy () (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:467) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
MissingReferenceException: The object of type 'ARMap' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. Immersal.AR.ARMap.InitializeMesh (UnityEngine.Vector3[] pointPositions) (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:265) Immersal.AR.ARMap.LoadMap (System.Byte[] mapBytes, System.Int32 mapId) (at Assets/ImmersalSDK/Core/Scripts/AR/ARMap.cs:218) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <4ba27aa039714eafa1e8892e51af2932>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153) UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83) UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
試したこと
公式ドキュメントの通り、事前にダウンロードしたmap fileをインスペクタに登録しました。
補足情報(FW/ツールのバージョンなど)
OS: macOS Monterey (Apple M1 Pro)
(追記: Windows11でも試しましたが、同様のエラーが発生しました)
Unity: 2021.3.16f1
回答1件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2023/01/25 05:49