Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 Jul 08, 2015 at 10:49 AM by starikcetin for the following reason:

Too subjective and argumentative

This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by starikcetin · Jul 08, 2015 at 09:32 AM · guievent triggeringgui-button

Changing GUI Buttons While Mouse Down

(For instace) I have 2 buttons, Button A triggers Event 1, Button B triggers Event 2, and both of them triggers Event 3 when mouse is relased on them or mouse is no longer on two of them.

So, which EventSystem triggers i need to use? Thanks in advance.

Comment
Add comment · Show 3
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 Nerevar · Jul 08, 2015 at 09:48 AM 0
Share

If you do use the 4.6 UI system you can use the basic "OnClick" event that is already available on your Button Component and then reference the function that will trigger the right functions (1 and 2 depending on the button). After add another EventTrigger Component with a "PointerUP" event that will both call the same function for your buttons (number 3).

avatar image starikcetin · Jul 08, 2015 at 10:01 AM 0
Share

@Nerevar PointerClick only works if you "click" once, that means you have to press and relase. I only want down. And onclick or pointerdown doesn't get updated in eventsystem when you change mouse to another button while mouse is down.

avatar image Nerevar · Jul 08, 2015 at 10:06 AM 0
Share

Then maybe try also working with On$$anonymous$$ouseOver()?

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

21 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

Related Questions

Is it possible to detect which GUIStyleState is used? 2 Answers

Simple Drop down list 1 Answer

Event Trigger 2 Answers

How do I make a button "enabled" using GUI.Button()? 1 Answer

What do I add to this script, so if you clicked the button ex. 30 times, a gui.box will appear? 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