- Home /
Question by
scrimson · Nov 21, 2016 at 07:20 AM ·
collisionuigameobject
How to make UI(Gameobject) appear on collision enter?
I have a mini map made out of blocks that i want to appear when my Hero picks up a map.
How do you make it appear/disappear.
I tried disabling the gameobject and in the Oncollision enter script, i enabled it. When my hero runs into the collider to trigger the gameobject active, nothing happens
if (collision.gameObject.tag == "Map") {
map.GetComponent<gameObject>.()Setactive (true);
Destroy (collision.gameObject);
}
Comment
Your answer
Follow this Question
Related Questions
Collision between UI element and GameObject 1 Answer
How to make a gameObject active triggered by a collision of another? 1 Answer
Find a specific child of a GameObject with the collision data from OnControllerColliderHit 4 Answers
Detect 2D GameObjects when "Colliding" with each other without RB and collider. 1 Answer
How to move a Game Object from a script not attached to it. 1 Answer