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 uhhhhhhh · Jul 26, 2012 at 06:29 PM · guitexturetouchmulti

GUITextures and Multi Touch

The root of my problem is the fact that I cannot seem to achieve multiple touches in a device build. Taken from Unity's ScriptReference:

 // Prints number of fingers touching the screen
 function Update () {
     var fingerCount = 0;
     for (var touch : Touch in Input.touches) {
         if (touch.phase != TouchPhase.Ended && touch.phase != TouchPhase.Canceled)
             fingerCount++;
     }
     if (fingerCount > 0)
         print ("User has " + fingerCount + " finger(s) touching the screen");
 }

Unity Remote properly prints out the number of touches on the screen. Once it's taken a step farther (actually built to the device), the touch count NEVER exceeds 1.

I hope there is someone who can enlighten me on why exactly I'm unable to get a correct print out.

Thanks!

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 whydoidoit · Jul 26, 2012 at 06:35 PM 0
Share

What device?

avatar image uhhhhhhh · Jul 26, 2012 at 06:41 PM 0
Share

Ah that would help - neither the iPhone 4 nor the iPad 2 worked.

avatar image whydoidoit · Jul 26, 2012 at 06:43 PM 0
Share

Have you tried doing a Debug.Log(Input.touches.Length)? See how many there are in the array - there can be some strange things with touches on the device depending on frame rate.

avatar image uhhhhhhh · Jul 26, 2012 at 06:55 PM 0
Share

Yea. The output looks very similar to the touch count. 1 seems to be my lucky number for this one.

Do you know whether or not changing the frame rate would be useful in this particular case? To the best of my knowledge it's still at the default value - I was playing with it before but had very little luck.

avatar image whydoidoit · Jul 26, 2012 at 06:56 PM 0
Share

You could try disabling the Display Link option in the XCode project - then it uses a different method to process the events - but unless your framerate is very low it shouldn't always miss like it seems to be.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by uhhhhhhh · Jul 26, 2012 at 07:28 PM

Just narrowed it down to a custom plugin. Doesn't make much sense why it was interrupting touch input - but removing ended up being a success.

Thanks again for the suggestions.

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

GUI texture touch input problem 1 Answer

GuiTexture (Touch button) unfollow camera! 1 Answer

GUI Texture Touch Android 2 Answers

Touch Input with GUI Texture 1 Answer

Aspect Ratio changes GUI Location Code in CSHARP 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