public ARKitWorldTrackingSessionConfiguration( UnityARAlignment alignment = UnityARAlignment.UnityARAlignmentGravity, UnityARPlaneDetection planeDetection = UnityARPlaneDetection.Horizontal, bool getPointCloudData = false, bool enableLightEstimation = false, bool enableAutoFocus = true, UnityAREnvironmentTexturing environmentTexturing = UnityAREnvironmentTexturing.UnityAREnvironmentTexturingNone, int maximumNumberOfTrackedImages = 0, IntPtr vidFormat = default(IntPtr), string refImageGroup = null, string refObjectGroup = null, ARWorldMap worldMap = null) { this.getPointCloudData = getPointCloudData; this.alignment = alignment; this.planeDetection = planeDetection; this.enableLightEstimation = enableLightEstimation; this.enableAutoFocus = enableAutoFocus; this.environmentTexturing = environmentTexturing; this.videoFormat = vidFormat; this.referenceImagesGroupName = refImageGroup; this.referenceObjectsGroupName = refObjectGroup; this.dynamicReferenceObjectsPtr = IntPtr.Zero; this.m_worldMapPtr = (worldMap == null) ? IntPtr.Zero : worldMap.nativePtr; this.maximumNumberOfTrackedImages = maximumNumberOfTrackedImages; }
static void _ar_session_get_world_map_completion_handler(IntPtr callbackPtr, IntPtr worldMapPtr) { GCHandle handle = GCHandle.FromIntPtr(callbackPtr); Action <ARWorldMap> completionCallback = (Action <ARWorldMap>)handle.Target; completionCallback(ARWorldMap.FromPtr(worldMapPtr)); handle.Free(); }