Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Fattie · Oct 06, 2011 at 09:38 PM · iphonebuttonsonguisimultaneousrepeatbutton

OnGUI/iPhone - cannot touch TWO+ buttons at the same time...?

Note - thanks to Goob below, he has told us that "Unity GUI is dependent on only having 1 source - the mouse [x, y]."

(If anyone has a reference or doco on that, it would be great to close the issue.) Cheers!


Building to iPhone or iPad. Using GUI.RepeatButton, make two trivial buttons on the screen.

(Think of them as "Run" and "Fire".) Hold down "Run". Now, while holding "Run", also put your left thumb on "FIre".

The touch on "Fire" is NOT registered.

In other words, it appears that using OnGui/RepeatButton .. in fact you can only read one button-press at a time.

Is this a known problem? Any solutions? Thanks.

{Aside -- For the record: I already realise it is usually said that UnityGUI has poor performance, for mobile. (Interestingly, even in an incredibly complicated scene, we have not found this.) Anyway, I would like to know how to solve this problem with OnGUI, or if it is a known bug/problem. Cheers.)

And -- RIP Steve.

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 kevork · Oct 06, 2011 at 09:51 PM 0
Share

Sounds like OnGUI is using the Input.mousePosition to deter$$anonymous$$e whether a button has been pressed.

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by J3-Gaming · Oct 06, 2011 at 11:44 PM

I have also encountered this problem, because your using mobile you have to use the Input.touches array. Unity GUI is dependent on only having 1 source (the mouse [x, y]).

Comment
Add comment · Show 1 · 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 Fattie · Oct 07, 2011 at 04:47 AM 0
Share

$$anonymous$$agnificent, thanks Goob. You rock. Do you happen to have any reference on documentation on that? That would be great to finally confirm it. Thanks again!

avatar image
-1

Answer by kgoswami · Oct 06, 2011 at 11:15 PM

Hi I am having the same problem. What I figured was that it actually presses at the mid point of your two touches. put a button in the middle of your two buttons and you will see it being pressed. Can someone please help in this matter. I am also having the same problem

Comment
Add comment · Show 1 · 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 J3-Gaming · Oct 06, 2011 at 11:41 PM 0
Share

That sounds very incorrect.

avatar image
0

Answer by DaveA · Oct 06, 2011 at 10:43 PM

Worst case you'd have to use Input.touches and roll your own buttons that way.

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

6 People are following this question.

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

Related Questions

How to press 2 buttons at the same time 1 Answer

My buttons do not appear when paused? 2 Answers

RepeatButton action upon release 2 Answers

[Old GUI] Buttons on Top not responding correctly on iOS 0 Answers

iPhone Touch Screen? 2 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