private void OnProductItemClickByShowCAD(BumModel bumModel) { if (this.currentLoadObject == null) { BumResourceManager.loadResource(bumModel.modelUri, null, null, BumResourceType.eBumResourceType_assetBundle, BumLoadingType.eBumLoadingType_www, BumResourcePoolType.ProductObject, bumModel.PlacementSurfaces, OnLoad); } }
public BumModel getModel(string id) { BumModel temp = null; modelCollection.TryGetValue(id, out temp); return(temp); }
private void OnItemClick(BumModel obj) { Debug.Log("OnItemClick"); if (OnModelClick != null) { OnModelClick(obj); } }
public IEnumerator init() { string modelUrl = "http://pboypz1tn.bkt.clouddn.com/was/table/projectTable.json"; BumResourceManager.loadResource(modelUrl, (object data) => { string json = (string)data; object jsonData = BumJsonTool.FromJson(json); if (jsonData == null) { return; } List <object> listData = jsonData as List <object>; for (int i = 0; i < listData.Count; i++) { BumModel model = new BumModel(); model.Deserializable(listData[i] as Dictionary <string, object>); modelCollection.Add(model.uuid, model); } loadingOver = true; }, null, BumResourceType.eBumResourceType_json); yield return(null); }