World Anchor Store never ready
See original GitHub issueI stumbled upon this problem yesterday, when i first got into world anchors. Basically what i tried is to get the World Anchor Manager working, but the problem i had is that the callback when the anchor store is ready never got called. So i thought maybe i just messed up and created a new project with just the spatialmapping and world anchor store manager in it. Well the end of the story was that it still didnt work.
So i fiddled around a little bit and changed:
protected override void Awake()
{
base.Awake();
AnchorStore = null;
WorldAnchorStore.GetAsync(AnchorStoreReady);
}
to
void Start()
{
AnchorStore = null;
WorldAnchorStore.GetAsync(AnchorStoreReady);
}
Basically i let the code in the Awake() function run in the Start() function. Maybe there is something not yet initialized when Awake() gets called, cause i also got an NullReference Error.
Is this a bug? Should the code in Awake() run in the Start() function?
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (10 by maintainers)
Top Results From Across the Web
World Anchor Store never ready · Issue #640
I stumbled upon this problem yesterday, when i first got into world anchors. Basically what i tried is to get the World Anchor...
Read more >Problems with the WorldAnchorStore - Forums
Hello guys, i'm currently working with the Mixed Reality Toolkit and the HoloLens and apparently the Toolkit uses the WorldAnchorStore class ...
Read more >World locking and spatial anchors in Unity - Mixed Reality
World Locking Tools automatically handles internal creation and management of spatial anchors. You don't need to interact with ARAnchorManager ...
Read more >How to use unity world anchors?
Putting the code on and item "WorldAnchor anchor = gameObject.AddComponent();" while syntactically correct, doesn't do anything. I can't find ...
Read more >WorldAnchorStore - Scripting API
The storage object for persisted WorldAnchors. Variables. anchorCount, (Read Only) Gets the number of persisted world anchors in this WorldAnchorStore.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, currently a unity bug associated to this.
[WSA] WORLDANCHORSTORE.GETASYNC THROWS AN EXCEPTION WHEN STARTING DEPLOYED HOLOLENS APP BUILT
If you have problems or questions please post them here HoloLens Forum.
Try this: