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
1
Question by powersjo · Mar 12, 2015 at 02:57 PM · unity 5javascriptbuttonunity 4.6onclick

Unity 5 UI Button OnClick

I'm sorry if this is covered somewhere else but I can't find it. I am seeing tons of tutorials for Unity 4.6 and some for 5 with the new UI system and the button options look like this in unity:

alt text

But when I add a UI button in the canvas I get options like this: alt text

Why does my OnClick look different and how can I use this OnClick? Say I create a function in JS:

function QuitGame(){ Application.Quit(); }

Where can I add this function option to a button? I see how many people do it in the first picture with the tutorials but I don't see my version of the Unity interface being used at all. Is this a Pro vs Private version difference?

capture2.png (22.2 kB)
capture3.jpg (35.6 kB)
Comment
Add comment · Show 1
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 fffMalzbier · Mar 12, 2015 at 10:08 AM 2
Share

Your inspector is in Debug mode. On the top right of the inspector is a small button with a drop-down menu. Select Normal to get to the normal inspector view.

For the tutorials, unity 5 has just whet public so tutorials that use unity 5 are quiet rare at the moment. But the UI has not change much since 4.6 so unity 4.6 UI tutorials should be fine. Unity has some nice tutorials them-self http://unity3d.com/learn/tutorials/modules/beginner/ui

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by powersjo · Mar 12, 2015 at 07:06 PM

That was it, wow thanks for the help. From @fffMalzbier

Your inspector is in Debug mode. On the top right of the inspector is a small button with a drop-down menu. Select Normal to get to the normal inspector view.

For the tutorials, unity 5 has just whet public so tutorials that use unity 5 are quiet rare at the moment. But the UI has not change much since 4.6 so unity 4.6 UI tutorials should be fine. Unity has some nice tutorials them-self http://unity3d.com/learn/tutorials/modules/beginner/ui

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
avatar image
1

Answer by mcsfernando10 · Feb 29, 2016 at 11:31 AM

alt text As you see in the image solution is to click on Normal Option Thanks goes to @powersjo


solution.png (13.9 kB)
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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to trigger a button click from script 3 Answers

Button only works once 1 Answer

Create clickable GameObjects (JS) 1 Answer

Moving Line with Collider 0 Answers

Unity 4.6 UI do something while button is pressed 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