Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Davidflynn · May 15, 2012 at 05:06 PM · c#pop-up

Popup on collider

How do i go about making a popup the comes up when you walk into an invisable collider that shows information? What im wanting to do is set and invisable collider in a door to a room and when you enter it pops up and you can read text about that room.

Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Davidflynn · May 15, 2012 at 05:15 PM 0
Share

there is nothing wrong with this question I think some one is just having fun click down vote.

avatar image Lo0NuhtiK · May 15, 2012 at 05:18 PM 2
Share

stuff
otherstuff

avatar image Lo0NuhtiK · May 15, 2012 at 05:25 PM 0
Share

Nope, wasn't any fun in the downvoting. I did it because pretty much every question I see of yours is always stuff you could have found fairly easily. It's like you don't even bother trying to find it for yourself. If the unity search bar is broken, try google.

avatar image Meltdown · May 15, 2012 at 05:34 PM 0
Share

You should also get downvoted for spelling a word incorrectly in the title. Unity as far as I know doesn't have a clilider class.

avatar image flamy · May 15, 2012 at 05:42 PM 1
Share

spelling trolls everywhere.... btw if u cant help jus dont reply.

btw regarding the question you have to set a collider without mesh renderer and mark it as trigger.

and in a script override this function "OnTriggerEnter()", inside this function call the code for pop up. for more info on popup check scripting reference.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Tobster232 · May 19, 2012 at 01:09 PM

Attach this script to the collider:

(make sure your player controller is tagged as 'Player')

 var player : GameObject;
 private var bool : boolean;
 
 function OnTriggerEnter(other : Collider) {
 if(other.tag == "Player") {
     bool = true;
     }
 }
 
 function OnGUI(){
     if(bool == true) {
    if(GUI.Button (Rect (100, 100, 500, 40), "Message goes here       Click to close")) {
    Debug.Log("Door Works!");
    bool = false;
   
    }
 } 
    
 
 }
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How do i begin with learn scripting. 3 Answers

Need help converting js to C 2 Answers

Converting this JS code to C# 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges