Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Using volume buttons to control speed?

Discussion in 'iOS and tvOS' started by TOES2, Mar 16, 2016.

  1. TOES2

    TOES2

    Joined:
    May 20, 2013
    Posts:
    135
    I am making a VR app where the user can look around and control movement speed up and down.

    As it is hard to control the speed using the touchscreen while the phone is headmounted, we want to use the volume keys on the headset to do that.

    Apparently it is possible to register the button presses using some private APIs in iOS, but just reading the current volume would also be OK and set the speed to that.

    Is there any easy way to do this in Unity? Any existing plugins or built in functionality that would provide the keypresses or current sound volume?

    Unfortunately I am not into iOS plugin development, so it would be great if there is some way to acheive this already...
     
  2. Abatuf

    Abatuf

    Joined:
    Jan 9, 2014
    Posts:
    18
    This is not implemented in Unity because of the fact what Apple refuses apps with such behaviour.