I have game objects (buildings) that when clicked need to display text about the building. What code can I add to the buildings to make the text visible when clicked?
I have tried adding a Button (script) to the building game object and setting it to GameObject.SetActive and adding the UI Gameobject to react. However, this doesn't seem to work.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
169 People are following this question.
Having constant trouble with Unity's inbuilt UI system.
I need help with TowerDefense based game.
Keyboard GUI navigation priority
Having trouble moving a UI panel
Display list as UI or GUI