public void OnStatusChange(LibPlacenote.MappingStatus prevStatus, LibPlacenote.MappingStatus currStatus) { Debug.Log("prevStatus: " + prevStatus.ToString() + " currStatus: " + currStatus.ToString()); if (currStatus == LibPlacenote.MappingStatus.RUNNING && prevStatus == LibPlacenote.MappingStatus.LOST) { mLabelText.text = "Localized"; LoadShapesJSON(mSelectedMapInfo.userData); StringTest tests = mSelectedMapInfo.userData ["test"].ToObject <StringTest> (); DebugText.Overflow(tests.stringtests[0] + "," + tests.stringtests[1]); // if (mapMetadata is JObject && mapMetadata ["shapeList"] is JObject) { // ShapeList shapeList = mapMetadata ["shapeList"].ToObject<ShapeList> (); } else if (currStatus == LibPlacenote.MappingStatus.RUNNING && prevStatus == LibPlacenote.MappingStatus.WAITING) { mLabelText.text = "Mapping"; } else if (currStatus == LibPlacenote.MappingStatus.LOST) { mLabelText.text = "Searching for position lock"; } else if (currStatus == LibPlacenote.MappingStatus.WAITING) { if (shapeObjList.Count != 0) { ClearShapes(); } } }
public static GameObject CreatePlaneInScene(ARPlaneAnchor arPlaneAnchor) { GameObject plane; if (planePrefab != null) { plane = GameObject.Instantiate(planePrefab); DebugText.Overflow("full plane!"); } else { plane = new GameObject(); //put in a blank gameObject to get at least a transform to manipulate DebugText.Overflow("empty plane!"); } plane.name = arPlaneAnchor.identifier; return(UpdatePlaneWithAnchorTransform(plane, arPlaneAnchor)); }