Esempio n. 1
0
    public void FillModelListDetail()
    {
        ModelDetails modelDetails = DownloadController.Instance.modelDetails;
        int          catCount = modelDetails.Category.Count;
        string       catName, subCatName;

        for (int i = 0; i < catCount; i++)
        {
            catName = modelDetails.Category[i].catName;
            int subcatCount = modelDetails.Category[i].SubCategory.Count;
            for (int j = 0; j < subcatCount; j++)
            {
                subCatName = modelDetails.Category[i].SubCategory[j].subCatName;
                int modelCount = modelDetails.Category[i].SubCategory[j].ObjectList.Count;
                for (int k = 0; k < modelCount; k++)
                {
                    ModelUIItem item = new ModelUIItem();
                    item.ItemName    = modelDetails.Category[i].SubCategory[j].ObjectList[k].ItemName;
                    item.ModelCat    = catName;
                    item.ModelSubCat = subCatName;
                    item.Icon        = modelDetails.Category[i].SubCategory[j].ObjectList[k].icon;
                    if (!modelUIItemList.CheckAlreadyExist(item.ItemName))
                    {
                        modelUIItemList.modelList.Add(item);
                    }
                }
            }
        }
        Debug.Log("FillModelListDetail-------");
    }
Esempio n. 2
0
    public void ItemClick(ModelUIItem modelUIItem)
    {
        if (ARModeManager.Instance.selectedModel)
        {
            Destroy(ARModeManager.Instance.selectedModel);
        }
        //ARModeManager.Instance.selectedModel = modelUIItem.ModelPrefab;
        Vector3 startPos = ARModeManager.Instance.planeObject.transform.Find("StartPointPlane").transform.position;

        ARModeManager.Instance.selectedModel = Instantiate(modelUIItem.ModelPrefab, startPos, Quaternion.identity);
    }
Esempio n. 3
0
 public void SetSelected(ModelUIItem item)
 {
     foreach (ModelUIItem modelItem in modelList)
     {
         if (modelItem == item)
         {
             modelItem.IsSelected = true;
         }
         else
         {
             modelItem.IsSelected = false;
         }
     }
 }