Search Unity

AR Foundation: Unsupported devices are passing enabled test.

Discussion in 'AR' started by StefanAugmentors, Jul 31, 2018.

  1. StefanAugmentors

    StefanAugmentors

    Joined:
    Nov 3, 2017
    Posts:
    15
    I'm using the following code to check if a device is supported:

    Code (CSharp):
    1. private void OnSystemStateChanged(ARSystemStateChangedEventArgs aRSystemStateChangedEventArgs)
    2.         {
    3.             ARSystemState = aRSystemStateChangedEventArgs.state;
    4.  
    5.             if (IsSupported == false)
    6.             {
    7.                 if ((int)aRSystemStateChangedEventArgs.state == (int)ARSystemState.Ready)
    8.                 {
    9.                     IsSupported = true;
    10.  
    11.                     if (PlayerPrefs.HasKey(GameConstants.AREnabled) == false)
    12.                     {
    13.                         ARSettingsChange(true);
    14.                     }
    15.                 }
    16.             }
    17.         }
    It works on most devices however some Apple devices are passing the test yet are not supported.

    Devices that passed that shouldn't include:

    iPad Mini 2.
    iPod Touch (5th generation)
     
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
  3. StefanAugmentors

    StefanAugmentors

    Joined:
    Nov 3, 2017
    Posts:
    15
    Thanks I'll try that.
     
  4. Revathi_ramadoss

    Revathi_ramadoss

    Joined:
    Jul 10, 2018
    Posts:
    3
    can u give a code for checking the compatibility of the phone
     
  5. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605