Ejemplo n.º 1
0
 /* 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);
 }
Ejemplo n.º 2
0
 /* find AR object from marker gameobject, marker may have child */
 private GameObject GetARObjectOfType(GameObject objectMarkerToAugment, ARObject.Type artype)
 {
     for (int i = 0; i < objectMarkerToAugment.transform.childCount; i++)
     {
         GameObject markertrans = objectMarkerToAugment.transform.GetChild(i).gameObject;
         if (artype == ARObject.Type.Arrow && (markertrans.GetComponent <ArrowScript>() != null))
         {
             return(markertrans.gameObject);
         }
         else if (artype == ARObject.Type.Check && (markertrans.GetComponent <CheckTrueScript>() != null))
         {
             return(markertrans.gameObject);
         }
         else if (artype == ARObject.Type.Board && (markertrans.GetComponent <DescriptionBoardScript>() != null))
         {
             return(markertrans.gameObject);
         }
     }
     return(null);
 }
 public void SetLastObjectType(ARObject.Type objtype)
 {
     this.lastObjectType = objtype;
 }