/* get last object type and send to markerConstructor */
 public void SendLastObject(ARObject.Type activeType)
 {
     if (markerConstructor == null)
     {
         markerConstructor = GameObject.Find("ARCamera").GetComponent <MarkerConstructor>();
     }
     markerConstructor.SetLastObjectType(activeType);
 }
Example #2
0
    private void LoadMarker()
    /* read marker data and add to markerConstructor's list */
    {
        string markerFileJsonName = fileToLoadName[(int)StctType.Marker];

        InitReading(markerFileJsonName);

        JMarker[] markers = JsonHelper.FromJson <JMarker>(jsonString);
        Debug.Log("Loading Marker total:" + markers.Length);

        MarkerConstructor markerConstructor = GameObject.Find("ARCamera").GetComponent <MarkerConstructor>();

        foreach (JMarker marker in markers)
        {
            markerConstructor.AddDraftMarker(new DraftMarkerData(
                                                 marker.markerID,
                                                 marker.markerImageName,
                                                 Mathf.CeilToInt(marker.priority), //may not
                                                 marker.markerOrientation,
                                                 marker.fkNodeID
                                                 ));
        }
    }