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. Dismiss Notice

Remote allow exit to home

Discussion in 'iOS and tvOS' started by Galaks, Feb 18, 2016.

  1. Galaks

    Galaks

    Joined:
    Feb 8, 2016
    Posts:
    12
    Hi, when I display the allowExitToHome, his default value is false. But when I'm trying to change the value to true, the value keeps false.
    Note: I didn't connect my remote, the result is only into Unity game mode.

    Here my code :

    #if UNITY_TVOS

    Console.Log("[QuitAlert] IS TV OS - UnityEngine.Apple.TV.Remote.allowExitToHome : " + UnityEngine.Apple.TV.Remote.allowExitToHome); // DISPLAY FALSE
    UnityEngine.Apple.TV.Remote.allowExitToHome = true;
    UnityEngine.Apple.TV.Remote.reportAbsoluteDpadValues = true;
    Console.Log("[QuitAlert] IS TV OS - UnityEngine.Apple.TV.Remote.allowExitToHome : " + UnityEngine.Apple.TV.Remote.allowExitToHome); // STILL DISPLAY FALSE
    #endif

    How is it possible?
    Thank you.
     
  2. indiec0re

    indiec0re

    Joined:
    Aug 27, 2015
    Posts:
    1
    I seem to recall that UNITY_TVOS isn't defined in engine properly, try either defining it yourself under the Build Settings or using UNITY_IOS
     
  3. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Are you by any chance checking this in the editor? I believe on device this should be fine. At least it works in my tests for Easy Input Helper for the Apple TV.