/// <summary>
        /// Gets the underlying pointer for the native anchor.
        /// </summary>
        /// <param name="anchor">
        /// The native anchor to obtain the pointer for.
        /// </param>
        /// <param name="cancellationToken">
        /// A <see cref="CancellationToken"/> that can be used to cancel the operation.
        /// </param>
        /// <returns>
        /// A Task that yields the pointer.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="anchor"/> is <see langword = "null" />.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">
        /// Thrown if the current platform is not supported by the SDK.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Thrown if a pointer could not be obtained from the native anchor.
        /// </exception>
        /// <exception cref="OperationCanceledException">
        /// The operation was canceled.
        /// </exception>
        /// <remarks>
        /// This method is async because ARKit cannot provide an anchor
        /// pointer until at least one frame has been processed. If a pointer
        /// is not returned on the first request, this operation will wait for
        /// one to be created.
        /// </remarks>

        static public IntPtr GetPointer(this NativeAnchor anchor)
        {
            // Validate
            if (anchor == null)
            {
                throw new ArgumentNullException(nameof(anchor));
            }

            // Placeholder
            IntPtr ptr = IntPtr.Zero;

#if UNITY_ANDROID || UNITY_IOS
            ptr = anchor.WorldAnchorHandle;
#elif WINDOWS_UWP || UNITY_WSA
            ptr = anchor.GetNativeSpatialAnchorPtr();
#else
            throw new PlatformNotSupportedException("Unable to retrieve the native anchor pointer. The platform is not supported.");
#endif

#if UNITY_EDITOR
#pragma warning disable CS0162 // Conditional compile statements prevent reaching this code in the unity editor
#endif
            // Warn if the anchor didn't give us a valid value
            if (ptr == IntPtr.Zero)
            {
                throw new InvalidOperationException("Couldn't obtain a native anchor pointer");
            }

            // Return the pointer
            return(ptr);

#if UNITY_EDITOR
#pragma warning restore CS0162
#endif
        }