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 /
  • Help Room /
avatar image
0
Question by Rihtarich-Alexander · Nov 05, 2015 at 03:01 PM · androidinputbuttonsnavigationkeys

How use ANDROID NAVIGATION BUTTONS

Hello everybody. I'm trying to figure out when the user clicks the navigation buttons on Android devices (Unity 5.2). But I have nothing. PLEASE HELP ME TO UNDERSTAND WHY unit can not do that. What should I do, that we could finally clicked DETERMINE THE "Menu | Home | Back." All I Found in the vast almighty Google is:

 if (Input.GetKeyDown (KeyCode.Escape)) 
 {
         // TODO....
 }

or

 if (Input.GetKey("escape"))
 {        
          Application.Quit();
 }

or

 public void Update ()  
 {
         if (Application.platform == RuntimePlatform.Android) 
         {
             if (Input.GetKeyUp(KeyCode.Escape)) 
            {
                //quit application on return button
                Application.Quit();
                return;
            }
         }
     }

or something similar... This is non-working code! What you need to do to earn !? PLEASE HELP ME!

Comment
Add comment · Show 5
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 HenryStrattonFW · Nov 05, 2015 at 06:05 PM 0
Share

Not looked into t myself, but I imagine you will not have access to the event of the player hitting the home button (at least nothing usable) since apps should not be able to change what this button does, it is a System button that will suspend any active application.

The $$anonymous$$enu button on the other hand might be accessible, good luck in your attempts to grab that event.

avatar image felsi · Nov 05, 2015 at 07:07 PM 0
Share

Did you add "escape" in the Input$$anonymous$$anager?

avatar image Rihtarich-Alexander felsi · Nov 05, 2015 at 07:37 PM 0
Share

alt text

Like this?

inputmanager.jpg (60.0 kB)
avatar image felsi · Nov 05, 2015 at 07:40 PM 0
Share

Input.Get$$anonymous$$eyDown("Cancel") should work

btw: youd should use http://docs.unity3d.com/$$anonymous$$anual/PlatformDependentCompilation.html especially in the update function ;)

avatar image Rihtarich-Alexander felsi · Nov 06, 2015 at 01:04 PM 0
Share

Input $$anonymous$$ey named: Cancel is unknown

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

42 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

Related Questions

How to replace keyboard inputs with touch inputs. 1 Answer

I want to move my cube on right or left when I touch screen for Android devices; Please help me which script I have to use 0 Answers

Switching between mouse/keyboard and controller for UI navigation (using Input System) 0 Answers

Using Custom Bluetooth HID input device for Android Unity Application. 0 Answers

Android keyboard from Input Field disappears immediatly after appearing 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