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 /
This question was closed Sep 04, 2019 at 12:10 PM by Beginner_at_Unity for the following reason:

New solution found.

avatar image
-1
Question by Beginner_at_Unity · Aug 15, 2019 at 02:55 PM · inputdisplaynot

Touch input results not shown in console

I obtained this from the udemy website. All you need is: 1 - Camera - this is the built-in tool you are given. 2 - Just add an empty object, call it touchtest. 3 - Add a script as below:

But I cannot get the coordinates as shown in the tutorial. Instructor was using 2018.x version. All my other projects are working well so I'm wondering if this has been disabled or hidden somewhere in 2019.2.0. See the screenshot to understand what the tutorial has done.! The number of touches are also not detected.alt text

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class TouchTest : MonoBehaviour
 {
     // Start is called before the first frame update
     void Start()
     {
         
     }
 
     // Update is called once per frame
     void Update()
     {
         if (Input.touchCount > 0)
         {
             //Debug.Log(Input.GetTouch(0).position);
             
             foreach(Touch touch in Input.touches)
             {
                 Debug.Log(touch.position);
 
             }
 
         }
     }
 }


touch-input-control.jpg (38.7 kB)
Comment
Add comment · Show 6
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 Vega4Life · Aug 15, 2019 at 03:00 PM 0
Share

Are you trying to get touches in the editor? Touches in the editor won't happen, we generally just simulate it with the mouse button if we need to test it in editor.

avatar image Beginner_at_Unity · Aug 15, 2019 at 04:07 PM 0
Share

Why are you referring to the editor when I showed the player mode? The mouse didn't work when I tested it. The instructor didn't use the mouse. If he did, i could have seen it.

avatar image Vega4Life Beginner_at_Unity · Aug 15, 2019 at 04:15 PM 0
Share

The editor.. meaning Unity. You cannot get touch input running the app through Unity (editor). Did they mention using Unity Remote? Then you can probably get touch input via the editor.

avatar image Deathdefy Beginner_at_Unity · Aug 15, 2019 at 05:56 PM -1
Share

If mouse input also did not work you are missing an EventSystem, also make sure you have the standardinputmodule

avatar image Beginner_at_Unity Deathdefy · Aug 29, 2019 at 08:19 AM 0
Share

I think i need to check the tutorials. Unless you have time to put hints here. So far, only unity tutorialsl works but i haven't learnt adb yet.

avatar image burnsky · May 07, 2021 at 11:19 AM 0
Share

Probably too late for the original requestor, but maybe someone else is looking for an answer. Try to append '.ToString()' to your data to display them as text.

https://docs.microsoft.com/en-us/dotnet/api/system.object.tostring?view=net-5.0

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

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

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers

Mobile input is not working ... 1 Answer

User input display 1 Answer

UnityAds - Ads not showing 0 Answers

What Input Settings should I use for "Window Movements X-Y" for Android Tablet such: "I-INN SPOCK-M87V", that have a 3 axis gyroscope? 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