/// <summary> /// Gets an anchor <see cref="Pose"/> from the specified native anchor <see cref="IntPtr"/>. /// </summary> /// <param name="anchorPointer">The anchor pointer.</param> /// <returns><see cref="Pose"/>.</returns> /// <exception cref="System.InvalidOperationException">Invalid anchor pointer. Can't get the pose.</exception> private static Pose GetPose(IntPtr anchorPointer) { if (anchorPointer == IntPtr.Zero) { throw new InvalidOperationException("Invalid anchor pointer. Can't get the pose."); } ARAnchor anchor = SpatialAnchorManager.AnchorFromPointer(anchorPointer); if (anchor == null) { Debug.Log("Didn't find the anchor"); return(Pose.identity); } return(new Pose(anchor.transform.position, anchor.transform.rotation)); }