- Home /
On object clicked open a window using C#
I want to write a code that whenever the user clicked on a specific object inside the game a window will appears contain a brief information (that was retrieved from the database) a bout this object using C#? can you please help me? i'm a beginner =(
For starters, you could use On$$anonymous$$ouseDown to detect that the mouse clicked your object, then you could use GUI.Label to show your info, inside OnGUI, I'm no OnGUI expert because I use NGUI. But to make it look like a window, I think you need to wrap up your label first with GUI.Box.
@vexe is pointing you in the right direction. You can use GUI.window as well for displaying the information about your object. Here is the script reference for that: GUI.window
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
About to start a new project, need help... 1 Answer
Scoring System 1 Answer
Changing player's moving direction 0 Answers