Exemple #1
0
    public override void DestroyAnchor(ulong anchorHandle)
    {
        Log("DestroyAnchor called on anchorHandle: " + anchorHandle);

        // Destroy anchor gameObject
        if (handleToAnchor.ContainsKey(anchorHandle))
        {
            var anchorObject = handleToAnchor[anchorHandle].gameObject;
            handleToAnchor.Remove(anchorHandle);
            Destroy(anchorObject);
        }

        // Destroy anchor in memory
        if (!OVRPlugin.DestroySpace(ref anchorHandle))
        {
            Log("OVRPlugin.DestroySpace failed for anchorHandle " + anchorHandle);
        }
    }