Assets/Scripts/ImportExportAnchorManager.cs
/// <summary>
/// Attempts to attach to an anchor by anchorName in the local store.
/// </summary>
/// <returns>True if it attached, false if it could not attach</returns>
Attempts to attach to an anchor by anchorName in the local store.
Attempts to attach to an anchor by anchorName in the local store .
bool AttachToCachedAnchor(string AnchorName)
    {
        Debug.Log("Looking for " + AnchorName);
        string[] ids = anchorStore.GetAllIds();
        for (int index = 0; index < ids.Length; index++)
        {
            if (ids[index] == AnchorName)
            {
                Debug.Log("Using what we have");
                WorldAnchor wa = anchorStore.Load(ids[index], gameObject);
                if (wa.isLocated)
                {
                    CurrentState = ImportExportState.Ready;
                }
                else
                {
                    wa.OnTrackingChanged += ImportExportAnchorManager_OnTrackingChanged_Attaching;
                }
                return true;
            }
        }
        return false;
    }
bool AttachToCachedAnchor ( string AnchorName ) { Debug . Log ( " " + AnchorName ) ; string [ ] ids = anchorStore . GetAllIds ( ) ; for ( int index = 0 ; index < ids . Length ; index ++ ) { if ( ids [ index ] == AnchorName ) { Debug . Log ( " " ) ; WorldAnchor wa = anchorStore . Load ( ids [ index ] , gameObject ) ; if ( wa . isLocated ) { CurrentState = ImportExportState . Ready ; } else { wa . OnTrackingChanged += ImportExportAnchorManager_OnTrackingChanged_Attaching ; } return true ; } } return false ; }
Attempts to attach to an anchor by anchorName in the local store.
Attempts to attach to an anchor by anchorName in the local store .
// Didn't find the anchor.
True if it attached, false if it could not attach
True if it attached false if it could not attach
AnchorName
string