UnityEngine.VR.WSA.Sharing.WorldAnchorTransferBatch.LoadAnchor_Internal C# (CSharp) Method

LoadAnchor_Internal() private method

private LoadAnchor_Internal ( IntPtr context, string id, WorldAnchor anchor ) : bool
context System.IntPtr
id string
anchor UnityEngine.VR.WSA.WorldAnchor
return bool
        private static extern bool LoadAnchor_Internal(IntPtr context, string id, WorldAnchor anchor);
        /// <summary>

Usage Example

Ejemplo n.º 1
0
        public WorldAnchor LockObject(string id, GameObject go)
        {
            WorldAnchor worldAnchor = go.GetComponent <WorldAnchor>();
            bool        flag        = worldAnchor != null;

            if (worldAnchor == null)
            {
                worldAnchor = go.AddComponent <WorldAnchor>();
            }
            WorldAnchor result;

            if (WorldAnchorTransferBatch.LoadAnchor_Internal(this.m_NativePtr, id, worldAnchor))
            {
                result = worldAnchor;
            }
            else
            {
                if (!flag)
                {
                    UnityEngine.Object.DestroyImmediate(worldAnchor);
                }
                result = null;
            }
            return(result);
        }