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 OmegaNemesis28 · Dec 27, 2013 at 03:43 PM · inputmousetouchwindows

Switch Between Touch And Mouse Controls

So I'm trying to publish an app to the Windows store and you need to also have good support for touch. Now, its gotten past certification and some people are reporting they dont have this issue. But some are, even myself on an Acer Iconia.

The way the game is setup to handle Mouse vs Touch is when you pretty the "Start" button on the main menu, it will toggle a boolean value that switches some things.

For example, if you're using a mouse - it will use: Input.mousePosition.x for the cursor.

If you touch it, it is supposed~ to use: var touch = Input.GetTouch(0); touch.position.x

However, some people get this after they touch the Start Button: http://i.imgur.com/3lGpZkt.jpg

Incase that is not readable...

 Exception: External component has thrown an exception. Type: System.Runtime.InteropServices.SEHException
 Module:UnityEngineProxy
 InnerException <NoData>
 Additional Info: <No Data>
 at UnityEngineProxy.InternalCalls.PInvokeCalls.Input_CUSTOM_GetTouch(Int32 ptr, Int32 param_0)
 at UnityEngingeProxy.InternalCalls.Input_CUSTOM_GetTouch(int32 index)


So I'm thinking that even though Im using a touch device, it isn't picking up the GetTouch(0). Its a null pointer for some whacky reason despite the fact I touched the Play button.

The weirdest part is only some people get this issue, it varies on machines with touch. And the NATIVE Unity 3D does not experience this issue. So I'm perplexed. Any suggestions? Is there a better way to handle touch?

Comment
Add comment
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

0 Replies

· Add your reply
  • Sort: 

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

18 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

Related Questions

Click Two objects At Once Windows 7 Touch 1 Answer

Simulate touch with mouse 6 Answers

Handle Mouse/Touch pan, zoom and click 0 Answers

Disabling touch events on Input.GetMouseButtonDown(1) 1 Answer

Custom mouse cursor is laggy on low/mid hardware 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