Skip to main content
New Participant
August 19, 2022

IAP GetProductList returning null?

Hey community,

So I followed a couple tutorials to make sure I was setting this up right. However, everytime I try to grab the GetProductList it seems to be a null reference "NullReferenceException: Object reference not set to an instance of an object".

 

The app is on App Lab, has 3 products, one not published, and the other two published and all three have every section filled out (Images, name, descriptions, etc).

 

I have some images below of how the system is setup, if anyone knows why this is happening and a fix I would love to hear it!

 

The error is where it says Debug.Log(msg.GetProductList().Count);

    This topic has been closed for replies.

    3 replies

    Inspiring
    October 12, 2023

    Hi, I'm having the exact same problem and using the exact same code.

    Did you ever find any solution to it?

    Inspiring
    October 12, 2023

    Ok so i got it to work for me.
    I was missing the Oculus EntitlementCheck.cs in my scene.
    Also don't forget to add your AppId as a string argument like this: 

    Oculus.Platform.Core.Initialize("<your app id here>");

    There might be a way to add it via Unity inspector somewhere, I read some hints about that, but I don't know.

    Super confusing because in some docs I read that the EntitleMentCheck is not needed for AppLab, but I guess that doesn't apply for IAP requests.

    Well, hope this helps someone else's headache.

    DeeVelopmnT
    New Participant
    October 14, 2023

    I would love to get more instructions on becoming a partner with unity 

    J M Cisneros