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 /
This question was closed Sep 05, 2014 at 07:22 AM by RedDevil for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by RedDevil · Sep 01, 2014 at 06:35 AM · uiguiunity 4.6

Unity New GUI Buttons not resposive on Touch

I have made a button to reload my scene and another one to exit the aplication once the player is dead.As all of us i am not experienced with this new GUI so i dont know if i did this right.I put my script on the camera object and it contains all the scripts for the UI. Under my canvas i put these scripts under an object and just activate it when the player dies.Under the buttons i just callled it from that script like this:

     public void ReloadLevel()
     {
         Application.LoadLevel(Application.loadedLevel);
     }
 
     public void ExitGame()
     {
         Application.Quit();
     }

Did i do this right or is the new UI just buggy? When i try the game on iPhone on these 2 buttons it just seems buggy because i can click them but nothing happends.Please help.Ty

Comment
Add comment · Show 2
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 Prasanna · Sep 01, 2014 at 10:13 AM 0
Share

Are you created GUI Texture Component?. If yes means, you must add OnGUI Function for accessing the GUI Buttons.

avatar image RedDevil · Sep 01, 2014 at 11:11 AM 0
Share

no i am using the new gui system from unity 4.6

1 Reply

  • Sort: 
avatar image
0

Answer by HarshadK · Sep 01, 2014 at 10:25 AM

You need to assign these functions to your respective buttons under the 'On Click' event for that button component of your button game object under canvas.

See UI Button tutorial for more details.

Also note that Application.Quit will not work in editor.

Comment
Add comment · Show 2 · 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
avatar image RedDevil · Sep 01, 2014 at 11:11 AM 0
Share

yes i did that but i think this is just a bug or something.

avatar image HarshadK · Sep 01, 2014 at 12:55 PM 0
Share

Do you have any script where you are checking mouse clicks to perform any other action?

If yes, then it usually overrides the button click event and performs the action for the mouse click.

I had the same issue and took hell out of me in finding this out.

One way to check is to add an 'on pointer exit' event to your button to check if it is actually working or not.

Follow this Question

Answers Answers and Comments

23 People are following this question.

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

Related Questions

Unity 4.6 UI - How to left-align scroll rect content 3 Answers

Oculus Rift virtual keyboard 0 Answers

How can I make a Unity 4.6 UI object trigger when I drag something onto it? 1 Answer

What's the most practical way to show particles on a "Screen Space - Overlay" Canvas with the new GUI (uGUI, Unity 4.6+)? 0 Answers

UI is not visible on Android lollipop after upgrading from 4.6 to 5. 0 Answers


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