public static UniTask <ARWorldMap> GetCurrentWorldMapAsnyc(this UnityARSessionNativeInterface arSessionNativeInterface) { var completionSource = new UniTaskCompletionSource <ARWorldMap>(); arSessionNativeInterface.GetCurrentWorldMapAsync(worldMap => completionSource.TrySetResult(worldMap)); return(completionSource.Task); }
public static IPromise <ARWorldMap> GetCurrentWorldMapPromise(this UnityARSessionNativeInterface arSessionNativeInterface) { return(new Promise <ARWorldMap>((resolve, _) => arSessionNativeInterface.GetCurrentWorldMapAsync(resolve.SetResult))); }