// Update is called once per frame void Update() { if (Input.GetMouseButtonUp(0)) { ClickObject = eventSystem.currentSelectedGameObject; Debug.Log(ClickObject); if (ClickObject == null) //UIではない→ゲーム画面をクリックしたとき { //openがあるなら閉じる int openNow = itemList.test(); if (openNow != -1) { itemList.Close(openNow); } //objの検出 else { GetObject(); } } else if (ClickObject.tag == "ItemListButton") { int buttonNum = itemList.ButtonNum(ClickObject); string itemName = itemList.ItemName(ClickObject); itemList.ItemSelect(buttonNum, itemName); itemList.CloseSelect(buttonNum); } else if (ClickObject.tag == "DetailView") { itemList.ItemComp(imageTap.ClickDetail()); } } if (Input.GetMouseButtonUp(1)) { itemList.DeletItem(); } }