Esempio n. 1
0
        public string GetCloudAnchorId(IntPtr anchorHandle)
        {
            IntPtr cloudIdHandle = IntPtr.Zero;

            ExternApi.ArAnchor_acquireCloudAnchorId(m_NativeSession.SessionHandle, anchorHandle, ref cloudIdHandle);
            var result = Marshal.PtrToStringAnsi(cloudIdHandle);

            ExternApi.ArString_release(cloudIdHandle);
            return(result);
        }
Esempio n. 2
0
        public static string GetCloudAnchorId(
            IntPtr sessionHandle,
            IntPtr anchorHandle)
        {
            IntPtr stringHandle = IntPtr.Zero;

            ExternApi.ArAnchor_acquireCloudAnchorId(
                sessionHandle, anchorHandle, ref stringHandle);

            string cloudAnchorId = Marshal.PtrToStringAnsi(stringHandle);

            ExternApi.ArString_release(stringHandle);

            return(cloudAnchorId);
        }
Esempio n. 3
0
        public static string GetCloudAnchorId(
            IntPtr sessionHandle,
            IntPtr anchorHandle)
        {
                        #if UNITY_EDITOR
            if (UnityEngine.Application.isEditor)
            {
                return(ARCoreCloudAnchorsEditorDelegate.Instance.GetCloudAnchorId(sessionHandle, anchorHandle));
            }
            #endif

#if !UNITY_IOS || CLOUDANCHOR_IOS_SUPPORT
            IntPtr stringHandle = IntPtr.Zero;
            ExternApi.ArAnchor_acquireCloudAnchorId(
                sessionHandle, anchorHandle, ref stringHandle);
            string cloudAnchorId = Marshal.PtrToStringAnsi(stringHandle);

            ExternApi.ArString_release(stringHandle);

            return(cloudAnchorId);
#else
            return(null);
#endif
        }