- Home /
Question by
Ryutosuke · Aug 04, 2015 at 08:23 PM ·
javascriptcanvasimages
Erase Images on Canvas Using UnityScript
So I have these images on a canvas. Their purpose is to serve as an item list so that the player knows what to collect. Once the player clicks the object, the object gets destroyed. What I want to do however is to also destroy the image on the canvas that corresponds to the destroyed gameobject. So when I click the object, it disappears as well as the image on the canvas. To destroy the gameobject upon clicking, I used a simple OnMouseDown function with a Destroy(gameObject); inside. I would prefer answers in Unityscript as i'm not familiar with C#.
Comment