Search Unity

Worldmap can't be created using ARKit Remote

Discussion in 'AR' started by gothParrot, Aug 23, 2018.

  1. gothParrot

    gothParrot

    Joined:
    Aug 8, 2018
    Posts:
    3
    I'm using an ARKit Remote to test a scene where I have to use the worldmap. When I print the current worldMappingStatus on each ARFrameUpdatedEvent, I always get ARWorldMappingStatusNotAvailable, however long I map the area. I tried this even with the UnityARWorldMap scene in the plugin examples, but get the same result.

    However, when I compile my app into an iPhoneX with iOS 12 beta, I am able to save the worldmap and use it.

    Does it mean I can't test WorldMap with ARKit Remote? That'd be quite frustrating, having to build the app again and again...

    I'm working with ARKit 2.0 beta, Unity 2017.4.4f1, Xcode 10 beta, on an iPhone X with iOS 12 beta.
     
  2. T1nk35B3ll

    T1nk35B3ll

    Joined:
    Aug 22, 2017
    Posts:
    2
    Code (CSharp):
    1.        
    2. public void GetCurrentWorldMapAsync(Action<ARWorldMap> completionCallback)
    3.         {
    4.             if (completionCallback == null)
    5.                 return;
    6.  
    7. #if !UNITY_EDITOR && UNITY_IOS
    8.             GCHandle handle = GCHandle.Alloc(completionCallback);
    9.             session_GetCurrentWorldMap(m_NativeARSession, GCHandle.ToIntPtr(handle));
    10. #else
    11.             // Not supported: Invoke user callback immediately with null ARWorldMap
    12.             completionCallback(null);
    13. #endif
    14.  
    Yes, there's no implementation to get the worldMap on the Editor