Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 KalleRosendahl · Jul 03, 2018 at 09:20 PM · inputinput.touchtouchcount

Input doesnt work in standalone build

This is an extremely annoying problem, my game works just perfectly in the editor, but when im in a build none of my inputs are working. i have tried

 private void Update()
     {
         if (Input.touchCount > 0)
         {
             UnityEngine.Debug.Log("Held down a finger");
         }
         if (Input.GetMouseButton(0))
         {
             UnityEngine.Debug.Log("Held down mouse");
         }
 
     }

in multiple scripts and it gives me nothing. if anyone knows about a workaround with getting the current touch count I'd be happy, or maybe a solution to why my inputs are returning me nothing.

Comment
Add comment · Show 10
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 MacDx · Jul 03, 2018 at 09:32 PM 0
Share

What code are you using besides logs to see if input is actually going through? Because logs won't show up on built games, only on the editor's console, or are you checking the log file in the Data folder of the built game?


Note: I'm assu$$anonymous$$g that when you say, "doesn't work" (in the future try to have a more detailed description of the problematic behaviour), it means that you're seeing nothing in the console, and the code you expected to run is not running or at least doesn't seem like so, thus there's no reaction to your Input checks.


Question. Why did you add the null reference tag to this question but you are not mentioning any null reference errors. Do you have them or not?

avatar image KalleRosendahl MacDx · Jul 03, 2018 at 09:37 PM 0
Share

actually there is a great asset in the store which lets u see the normal logs in-game right here

avatar image KalleRosendahl MacDx · Jul 03, 2018 at 09:42 PM 0
Share

oh, im gonna try to have more accurate stuff in the title, im sry.. i tagget nullreference because i am getting a nullreference, but later on when i wrote i realised that it had nothing to do with it, but forgott to remove topic

avatar image MacDx KalleRosendahl · Jul 03, 2018 at 09:48 PM 0
Share

I see. For the code you're showing there's no reason it shouldn't be running. So here are a couple more questions.


You're checking for touch input on a standalone build, are you running this standalone build on a device that has touch input?


Are you sure the gameobjects and this script's components attached to said game object are not deactivated when you run the game?


Have you tried using other code besides logs to see if there is a response?

Show more comments

1 Reply

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

Answer by KalleRosendahl · Jul 04, 2018 at 09:33 AM

OK found out that the issue was cassed by TouchScript asset because they are doing stuff with my inputs

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 mchiovaro · Feb 07 at 07:36 PM 0
Share

@KalleRosendahl I know this was from a while ago, but what exactly was TouchScript doing to your inputs? I'm having a similar issue and am wondering if it's due to the same cause.

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

104 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 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 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 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 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

Can someone help with mobile input on my game? 0 Answers

Virtual joystick in the new input system 0 Answers

Why does my sound play multiple times using touchcount? 1 Answer

For mobile games, how could you divide the screen into three buttons vertically? 1 Answer

Drag an object to touch position(Problem) 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