Forum Discussion
ComeOnAndSam
4 years agoExplorer
SpatialAnchor Demo Scene/Manager does not work, throws error
Going to the new SpatialAnchor demo scene, navigating to "Create Anchor" on the UI, the pressing A to place it, produces the error.
ArgumentException: An item with the same key has already been added. Key: 0
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
SpatialAnchorSession.tryEnableComponent (System.UInt64 anchorHandle, OVRPlugin+SpatialEntityComponentType type) (at Assets/Oculus/SampleFramework/Usage/SpatialAnchor/Scripts/SpatialAnchorSession.cs:122)
SpatialAnchorSession.CreateSpatialAnchor (UnityEngine.Transform T_UnityWorld_Anchor) (at Assets/Oculus/SampleFramework/Usage/SpatialAnchor/Scripts/SpatialAnchorSession.cs:185)
AnchorSpawner.PlaceAnchorAtTransform (UnityEngine.Transform transform) (at Assets/Oculus/SampleFramework/Usage/SpatialAnchor/Scripts/AnchorSpawner.cs:48)
AnchorUIManager.PlaceAnchor () (at Assets/Oculus/SampleFramework/Usage/SpatialAnchor/Scripts/AnchorUIManager.cs:236)
AnchorUIManager.Update () (at Assets/Oculus/SampleFramework/Usage/SpatialAnchor/Scripts/AnchorUIManager.cs:104)The anchor does not get placed, as such I have no way to test them.
3 Replies
Replies have been turned off for this discussion
- ComeOnAndSamExplorer
Upon further inspection, the "Canvas" element that is the anchor menu is missing a script. I don't know what's supposed to be here.
- ComeOnAndSamExplorer
Any more info on this problem? Do other people who access the scene have the same issues?
- Anonymous
I went through Skarred Ghost's tutorial instead of trying to run the provided sample code.
https://skarredghost.com/2022/01/05/how-to-oculus-spatial-anchors-unity-2/
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 9 months ago
- 3 months ago