public void OnUpdate(IntPtr frameHandle) { FrameHandle = frameHandle; #if UNITY_EDITOR || UNITY_ANDROID // After first frame, release previous frame's point cloud. if (PointCloudHandle != IntPtr.Zero) { m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle); PointCloudApi.Release(PointCloudHandle); PointCloudHandle = IntPtr.Zero; } IntPtr pointCloudHandle; FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle); PointCloudHandle = pointCloudHandle; #endif }
public void OnUpdate() { // After first frame, release previous frame's point cloud. if (m_PointCloudHandle != IntPtr.Zero) { m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(m_PointCloudHandle); PointCloudApi.Release(m_PointCloudHandle); m_PointCloudHandle = IntPtr.Zero; } // TODO (b/73256094): Remove when fixed. if (LifecycleManager.Instance.SessionStatus == SessionStatus.Tracking) { FrameApi.TryAcquirePointCloudHandle(out m_PointCloudHandle); } }
public void OnUpdate(IntPtr frameHandle) { FrameHandle = frameHandle; if (ApiConstants.isBehaveAsIfOnAndroid) { // After first frame, release previous frame's point cloud. if (PointCloudHandle != IntPtr.Zero) { m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle); PointCloudApi.Release(PointCloudHandle); PointCloudHandle = IntPtr.Zero; } IntPtr pointCloudHandle; FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle); PointCloudHandle = pointCloudHandle; } }
public void OnUpdate(IntPtr frameHandle) { FrameHandle = frameHandle; if (ApiConstants.isBehaveAsIfOnAndroid) { // After first frame, release previous frame's point cloud. if (PointCloudHandle != IntPtr.Zero) { m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle); PointCloudApi.Release(PointCloudHandle); PointCloudHandle = IntPtr.Zero; } // TODO (b/73256094): Remove when fixed. if (LifecycleManager.Instance.IsTracking) { IntPtr pointCloudHandle; FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle); PointCloudHandle = pointCloudHandle; } } }