Search Unity

Exception: Error: called non-existent method System.Boolean UnityEngine.VR.VRSettings::get_enabled

Discussion in 'Unity IAP' started by roel_sebastiaan, Sep 30, 2020.

  1. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    Unity IAP on latest version 2.1.1
    Unity version 2020.2.0b.3094
    Android SDK Platform 30

    Since updating Unity, IAP and Android SDK I can no longer use IAP, looks like exactly the same error as here:
    https://forum.unity.com/threads/exc...unityengine-vr-vrsettings-get_enabled.518868/

    I have attempted all resolutions mentioned in the post above.

    I receive the error: Exception: Error: called non-existent method System.Boolean UnityEngine.VR.VRSettings::get_enabled
    when running logcat, does not appear in editor.

    Running API updater does not resolve it, deleting Library folder does not resolve it.
    Ideally I would manually update the API but that does not seem possible?

    Re-importing UnityPurchasing returns 88x below but compiles fine after:
    Assertion failed on expression: 'ins.second || ins.first->second == artifactID || (ins.first->second == CircularDependencyArtifactID() && !artifactID.IsValid()) || GetPathFromAssetGuidV2(key.GetGUID()).ends_with(".cs")'
    UnityEditor.AssemblyHelper:ExtractAllClassesThatAreUserExtendedScripts (string,string[]&,string[]&,string[]&)
     
    Last edited: Sep 30, 2020
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You are using a Beta version of Unity, we haven't tested this yet. Thanks for the heads up, we will keep an eye out for this! In the meantime, I would recommend to use a released and supported version of Unity.
     
  3. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    I actually updated to beta in a hope it would resolve it.. which version do you recommend I revert to?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm using 2019 here without issue (all versions), I haven't tested with 2020. As always, first test with a new/empty project and import IAP, and then compare to any issues you might be having in your project.
     
  5. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    I have a 2019 version installed, I'll give it a try and report back here tomorrow.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you will need to use a project backup, Unity does not support downgrading.
     
  7. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    Hi Jeff, despite lacking a backup I managed to downgrade the project to 2019.4.11f1
    Reimporting some of the packages and fixed some bugs that came with that..

    In this version the error does not appear and IAP is working as expected.

    Can I find a timeframe somewhere on when the 2020 production version of Unity will be released? I much prefer the new version despite that old bug reappearing.

    Thanks for your help
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you get the "Update Unity API?" dialog during IAP install? I just tested with Unity 2020.1.6f1 and properly received the popup. I then clicked "Yes, I have made a backup" (required). I haven't tested on a device yet however. Can you confirm the steps so far?
     
  9. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    Yeah I get that prompt and click on Yes, it all looks fine in Editor. There's no errors, it compiles and can build. But the error mentioned above appears on the device and the IAP (Google) window does not appear.

    It would be amazing if it would work on 2020 because I really enjoyed using it.
     
  10. dimlksiin

    dimlksiin

    Joined:
    Apr 18, 2020
    Posts:
    2
    Message: Exception: Error: called non-existent method System.Boolean UnityEngine.VR.VRSettings::get_enabled()
    Exception: java.lang.Throwable:
     
  11. dimlksiin

    dimlksiin

    Joined:
    Apr 18, 2020
    Posts:
    2
    2020.4 pro
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We will look into this at high priority this week.
     
  13. roel_sebastiaan

    roel_sebastiaan

    Joined:
    Jan 5, 2018
    Posts:
    6
    Appreciate it Jeff, I guess this thread can be closed now as the LTS version of Unity does not contain the issue and you are aware of it in 2020 versions.

    Thanks for your support!
     
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Threads aren't really closed, it's a valid issue and would be for any users using 2020 with the current IAP , if the evidence is true.
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I did not see the VRSettings issue. I'm using Unity 2020.1.6f1 on Windows 10 and IAP 2.0.0 with In App Purchasing 2.1.1 in Package Manager. It initialized and I received several receipts from previous purchases during initialization, and was able to make purchases. I tested on a Samsung tablet SM-T380
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    There is no 2020.4 version