Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UI image appears after "picking up" item

Discussion in 'UGUI & TextMesh Pro' started by Grymmjow, Sep 20, 2017.

  1. Grymmjow

    Grymmjow

    Joined:
    Mar 21, 2014
    Posts:
    5
    So basically I need to make an image appear on the UI after the player has triggered a collider with another item. None of the scripts that I have found so far have been of any help. If anyone has an easy and clean script that I could use it would help me a lot.

    Thanks in advance
     
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,688
    Just so I understand you correctly. You have two non-ui 3D / 2D objects which have colliders and when they collide, you want a UI object to appear?

    Would it not just be easy enough to keep a reference to the UI GameObject in one of the scripts (or a manager) and then just enable / disable the UI when OnCollision methods fire?