Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 CoreApp2 · Sep 20, 2015 at 06:54 PM · androiduibuttonpausetouchscreen

Touch screen on Android to pause the game

Hello people,

Please i have a very very big problem, that i cant solve since a few days:

I have a sphere and it jumps every time the screen is touched. At the bottom left of the screen, I have a (UI) pause button (See Image). The problem is that, as soon as I touch the Pause button to pause the game, the sphere also jumps parallel.

alt text

What I have done: i added a raycast to the main camera and the interface IPointerClickHandler to script which is attached to the pause button. And then i implemented the code for the pause in the public function void OnPointerClick (PointerEventData EventData). But it is still not working.

This video didnt help me https://www.youtube.com/watch?v=EVZiv7DLU6E:

i also read and applied many answers in forum http://forum.unity3d.com/threads/ispointerovereventsystemobject-always-returns-false-on-mobile.265372/

http://answers.unity3d.com/questions/664139/raycastingtouches-with-timescale-0-c.html but it always didnt work !!

I have unity 5.0.4 . I dont understand what is wrong. My hierarchy:

main camera

sphere // contains the script with jump code in void update() {if Input.to...

canvas

pausebutton //contains the script for pause

eventsystem

cube

cube...

I hope, you can help me to understand what is wrong, thank u !!

game2.jpg (51.2 kB)
Comment
Add comment · Show 2
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 Jussumman · Oct 18, 2015 at 12:02 AM 0
Share

I'm trying to figure out a similar problem. The video you link to gives 3 ways of dealing with, have you tried all of them? If you have an object underneath your pause menu this video deals with that exactly.

$$anonymous$$y situation is that I have the "$$anonymous$$enu/Esc/Pause" button on the top corner (taken from UI sample asset) and my game is a simple "Fire1" touch entire screen (to make character do something) and when I click the $$anonymous$$enu button it shows the menu and pauses but also activates the Fire1 at the same time! I set the canvas to priority 1 (layer) but that didn't work. I'm going to try to make the entire screen a button but there's probably an easier method I don't know about. alt text

(on desktop it's designed to open menu by pressing "escape" here but on mobile the person would have to touch the menu button and there is no "escape" key so I have to get it to work by touching, without making the Fire1 active at the same time).

avatar image Venture87 · Feb 01, 2016 at 05:04 PM 0
Share

This tends to be a common issue and I am still dealing with the problem. Did you find any suitable solution? Thanks!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Problem with touch button (when moved) 2 Answers

Button with Animation disappear in Android build 0 Answers

Android Pause conflicting with action 1 Answer

Material Design Menu 1 Answer

Tapping a button and screen interference 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