public static List <ItemInfo> GetNearItems(float latitude, float longitude) { ItemInfo[] itemInfoArray = null; try { var arlWorld = new AndroidJavaClass("com.FURB.ARLibrary.lib.ARLWorld"); var arlWorldInstance = arlWorld.CallStatic <AndroidJavaObject>("getARLWorldIntance"); var json = arlWorldInstance.Call <string>("getNearItems", latitude, longitude); itemInfoArray = JsonHelper.FromJson <ItemInfo>(json); } catch { itemInfoArray = new ItemInfo[] { new ItemInfo(new Guid().ToString(), DeviceScript.Instance().LastLatitude(), DeviceScript.Instance().LastLongitude(), "") }; } var items = new List <ItemInfo>(); foreach (ItemInfo itemInfo in itemInfoArray) { items.Add(itemInfo); } return(items); }
void Start() { info = GetComponentInChildren <TextMesh>(); info.gameObject.SetActive(false); line = GetComponentInChildren <LineRenderer>(); line.gameObject.SetActive(false); if (mesh != null) { gameObject.AddComponent <MeshFilter>().mesh = mesh; } device = DeviceScript.Instance(); }