// Update is called once per frame void LateUpdate() { if (Input.GetMouseButtonDown(0)) { PlanetIsClick(); if (mousepos.ClickObject() == transform.gameObject) { PlanetUIShow(); } if (mousepos.ClickObject() == GameObject.Find("Main Camera")) { planetUIcanvas.gameObject.SetActive(false); } } }
// Update is called once per frame void LateUpdate() { if (Input.GetMouseButtonDown(0)) { StarIsClick(); if (mousepos.ClickObject() == transform.gameObject) { StarUIShow(); starUIscript.starControlMaster = this; } if (mousepos.ClickObject() == GameObject.Find("Main Camera")) { starUIcanvas.gameObject.SetActive(false); } } }