Cross-Platform IAP Store Page with Unity IAP in 2023 | Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

ความคิดเห็น • 175

  • @rexbefall99
    @rexbefall99 11 หลายเดือนก่อน +27

    This tutorial doesn’t mention for iOS you have to review and agree to the Paid App document in App Store Connect to get IAP to work at all on iOS. I was stuck on “No products available” for a while and on completing the document everything started working. Just an FYI in case anyone is having a similar issue

    • @soumyamohanty7389
      @soumyamohanty7389 9 หลายเดือนก่อน

      I face same problem can you please tell me how to solve

    • @johndee2091
      @johndee2091 7 หลายเดือนก่อน

      Oh So if I do a testflight and then IAP don't work it's because of the paid tax form ? I tried hundred of thing to no avail. Even submit my game and they refuse it saying the IAP did not work but never said why. IAP work when testing it with my Ipad and xCode storekit but thag's about it.

    • @OwenWithDaB
      @OwenWithDaB 6 หลายเดือนก่อน +1

      Yup, you are the absolute best! Best information ever, I stuck on that part for a week and even send a message to Unity forum asking, they tell me to uninstall IAP and stuff, wish I see this comment earlier so I don't have to deal with that stress lol

    • @rexbefall99
      @rexbefall99 6 หลายเดือนก่อน +1

      @@johndee2091yes most likely the tax form if everything else is set up correctly. Double check your implementation and the make sure you’ve completed the forms

    • @johndee2091
      @johndee2091 6 หลายเดือนก่อน +1

      @@rexbefall99 Thank you :)

  • @oliverbrzoska9055
    @oliverbrzoska9055 ปีที่แล้ว +7

    Great tutorial, but unfortunately not for subscriptions! They no longer work the same as other In-App Purchases, especially Google changed their system (with multiple 'base plans' and 'offers' per subscription). Unity IAP seems not to work seamlessly with subscriptions. Do you have any advice/link for dealing with subscriptions with Unity in 2023? Or even better: please do a Tutorial for subscriptions with Unity in 2023!

  • @kareembutler5916
    @kareembutler5916 4 หลายเดือนก่อน +1

    great tutorial.
    How would i make a restore purchase button? and two only 3 of the 4 products show in the store. I am getting debug alerts stating everything was successfully loaded but only 3 Ui Products are being created

  • @khosroafshar
    @khosroafshar 4 หลายเดือนก่อน +1

    Thanks for your Great tutorial!

  • @flurinjenal374
    @flurinjenal374 ปีที่แล้ว +6

    At 3:00, error: "You are not authorized to set the key." - There is no Legacy Analytics to toggle on an off. What helped for me: Insert the key in the Unity dashboard (as shown in the video in the previous step), restart Unity and logout as Unity user and login again. It took some minutes after it but then the error went away.

    • @monkegames6133
      @monkegames6133 ปีที่แล้ว

      I LOVE YOU MAN! I did it but then I waited like an idiot for the error to go away so I wanna add that after doing everything you said, you need to insert the key again and then press "verify". I looked like that shocked O.O anime meme guy when it ended up working

    • @flurinjenal374
      @flurinjenal374 ปีที่แล้ว

      Great that it worked for you too! Yes, you have to click the button again.

    • @abdulhaseebkhan1177
      @abdulhaseebkhan1177 ปีที่แล้ว +1

      sir i logOut User , restart unity, login Again, did some wait , but still i face this issue that you are not authorized to set licency key

    • @monkegames6133
      @monkegames6133 ปีที่แล้ว +1

      @@abdulhaseebkhan1177 Did you get the app key on Google play and insert it in the Unity dashboard first?

    • @abdulhaseebkhan1177
      @abdulhaseebkhan1177 ปีที่แล้ว

      @@monkegames6133 yes i did.

  • @Strangertoyourlife
    @Strangertoyourlife 2 หลายเดือนก่อน

    1. Before uploading to the In-App Products tab you will need to set up your payment profile , you don't need to be registered as a legal company also
    2. If you cannot get your csv file uploaded correctly (mine was saying there was no default language) , the only solution I found was to manually enter them into the In-app Products page

  • @flurinjenal374
    @flurinjenal374 ปีที่แล้ว +2

    How do you implement a subscription-type IAP where the player gets charged monthly? Specifically, how can you check in your game if the player is still subscribed or if he uncubscribed in his phone settings and stop giving him the benefits of the subscription?

  • @certilremy
    @certilremy 2 หลายเดือนก่อน

    Can you help me? I follow your turtorial, I completed all the step, it works perfect on my laptop. When I move to my iphone, I manualy add all the product to app store. i get this error on my xcode logs : "Purchasing failed to initialize. Reason: NoProductsAvailable. More details: No product returned from the store.". Do i need to wait for my app aproved to test it on my iphone?

  • @spectrumRoyale
    @spectrumRoyale ปีที่แล้ว +3

    I think the main problem against this method is that you can't set global price which when you are using automatic unity purchasing(recommended) it setup for you automatically for all regions. Let's say initial price is 5EUR in many other countries it should be different.

    • @LostSol25
      @LostSol25 ปีที่แล้ว +1

      Did you find a way, struggling with that now

  • @user-df6zt6yi9c
    @user-df6zt6yi9c ปีที่แล้ว +1

    the product ui shows up in the editor, but not on the google play export. Any advice?

  • @ooDEFENDERoo
    @ooDEFENDERoo ปีที่แล้ว +2

    Thank you!

  • @seanlynch4354
    @seanlynch4354 3 หลายเดือนก่อน

    when I click buy on my iPhone it doesn't open the typical apple wallet and allow Face ID to let me pay. Instead I just get a little prompt that asks me to type in my appleID email and password. Other games have the wallet appear with all the product information displayed in a nice interface. How can I get my in app purchases to look like this?

  • @yale3d
    @yale3d 6 หลายเดือนก่อน +1

    It works only with USD. If i give the price in the IAP Catalog in USD (I cannot set the currency anywhere, and it is always USD), the price on Google Play Store is wrong. If i give the price in my local currency (which is default by google, so i cannot change it), it shows an alarmingly large amount of USD in the App. Mildly infuriating.

  • @prudentibus
    @prudentibus ปีที่แล้ว +1

    Thx for sharing a project on git

  • @nadaked
    @nadaked ปีที่แล้ว +1

    thnx a lot!!

  • @juanlamanna2915
    @juanlamanna2915 ปีที่แล้ว +3

    wow muchas gracias no entendía para nada la funcionalidad de estos scripts hasta que vi tu video,
    por cierto para no escribir solo descargue los tuyos y los edite

    • @worchock
      @worchock ปีที่แล้ว

      Hola, amigo te ha funcionado el código correctamente? es decir ya lo probaste?

  • @erjuanjojj
    @erjuanjojj ปีที่แล้ว +2

    One more question please X)), for purchasing in the real store, we only need to remove the two lines of 27:54??
    or do we have to change something more? Thank you

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      As long as everything else on the store page is set up, all you should do is remove the “fake store” code and, based on the earlier implementation, should go to the correct “real store”

  • @yannmassard3970
    @yannmassard3970 ปีที่แล้ว

    Man, I love the way you code, but coding the Ui to build itself (are you coming from a swift background) was a first time for me ! learned a lot about events and invoke()

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I haven’t used Swift. Glad to hear you’re enjoying it though!

  • @lucyp4339
    @lucyp4339 3 หลายเดือนก่อน

    In the HandleLoadIcon(AsyncOperation operation) function, the request = operation as ResourceRequest is always returning null and therefore not completing the rest of the shop setup. I've copied and pasted the code from github in case I typed it in incorrectly. Any help from anyone please T-T

  • @t-games7419
    @t-games7419 ปีที่แล้ว +1

    I am still unable to verify options in In-App Purchasing .Even I On and Off the Legacy Analytics😟😟😟

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      What do you mean by verify options? You get an error when initializing?

  • @lemangkuk
    @lemangkuk 11 หลายเดือนก่อน +1

    I have a question, for example, If I make a purchase button for remove ads, or unlock more content, how does the state save for removing ads and unlocking more content? for example if user made the purchase and they uninstall the app from the phone and install back again, will the remove ads or, unlock more content considered purchase by the user and they don't have to buy again?

    • @LlamAcademy
      @LlamAcademy  11 หลายเดือนก่อน

      That is a good (and common) question. For persisting purchases you'll need some way to save it on the cloud. Apple and Google both (at least they used to) provide a small amount of cloud storage for your app for free. In there you could store small amounts of data such as "unlocked ad free" and pull that on app launch.
      In my game I had all the purchases synchronized to PlayFab, so whenever the user logged in, I pulled the data off PlayFab and knew their loadout, purchases, etc...
      For simpler use cases I think the Apple/Google services can suffice.

  • @erjuanjojj
    @erjuanjojj ปีที่แล้ว +1

    If I have a non consumable item like "remove ads", how can I manage that, once someone purchases it, set some variable inside the software to handle showing or not showing ads? thank you

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I think you explained it perfectly 🙂. You check the product that was purchased, for this particular one, you set some boolean like hasPurchasedAds and persist that somewhere, such as the save file for the player, a cloud storage location, or even simply in PlayerPrefs (for initial testing at least).

    • @erjuanjojj
      @erjuanjojj ปีที่แล้ว +1

      @@LlamAcademy Hmmm, I think you can simply, in any place of your code, do a for loop in the catalog products and check the field "hasReceipt" of each one. That way you are always checking which items have receipt or not. I'm not 100% sure but I thinsk so.

  • @cristiansmochina9056
    @cristiansmochina9056 6 หลายเดือนก่อน

    What should I do if I already have the catalog setup in Apple? How can I import it in Unity?

  • @newsystem3667
    @newsystem3667 6 หลายเดือนก่อน

    I would like to see subscription product implementation

  • @LostSol25
    @LostSol25 ปีที่แล้ว

    Quick question -> how could i have the currency change due to different locations, i have noticed this on most games.

  • @light-light
    @light-light 5 หลายเดือนก่อน

    Payouts are essentials? Just leave it blank and manually give item from code?

  • @WebBusiness
    @WebBusiness ปีที่แล้ว

    i get the price in my local currency 4.99 INR in google play console how to set it global

  • @VEETEEGameStudio
    @VEETEEGameStudio ปีที่แล้ว

    i get null refrences when i try to access the payout quantity on the ProcessPurchase Function when im trying to handle giving the player the product

  • @Danny1y5
    @Danny1y5 ปีที่แล้ว +1

    When uploading google play csv I get an error "Missing the listing for the default language"

    • @recriandogames
      @recriandogames ปีที่แล้ว

      Me too

    • @online.fabian
      @online.fabian ปีที่แล้ว

      You need to ad a translation in your default Language

  • @drunk3np1nky40
    @drunk3np1nky40 ปีที่แล้ว +1

    Hello again! May I ask you for an advice? What is the best approach you have used so far for adding different entities to player? For instance, artifact and soft currency are not the same entities, they are different classes, different fields. For artifact it's obvious to set level and rarity, but for soft currency only amount. So, how do you typically handle purchase like at 24:50? Thank you in advance! And thank you very much for your impact in our learning process!

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      I can explain how I implemented this in my game and hopefully it provides some insight into how you can do it for your game.
      I used PlayFab which, upon login, I fetched the details about a player. This included information that you could store locally in a file such as the "inventory", different amounts of each "currency", and their stats.
      In my game I had unlockable items and currency available for purchase.
      When a player makes a purchase, I sent a request to PlayFab to validate a purchase and on the server there, I set "ItemXXX_Unlocked" to be true and sent a success message back to the mobile client.
      For more simple use cases such as only on-device unlocks, you can remove the network and server complexity and just set the boolean to true. Because my game had relatively few unlock items this was simple and worked well. If you have a large number of items, perhaps on each discrete item you would have an "Unlocked" boolean and set that based on the purchase.
      For currency, it is very simple because we just add the amount purchased to the player's "inventory".
      I only had 3 types of purchases, currency, item, or bundle which may include multiple items and/or currency. I implemented a purchase processing strategy based on the item type and either added currency, did the unlock as described above, or for the bundles, parsed the json "additional data" and used one of the other strategies for each element of the bundle.

  • @OwenWithDaB
    @OwenWithDaB 6 หลายเดือนก่อน

    not sure if I did something wrong, but for those making builds for IOS and google, remember to handle the fakestore, might need to do a #if to check if it's running in editor or development build, otherwise the fakestore will get carry over to real builds you uploaded.

  • @doctordiv
    @doctordiv 7 หลายเดือนก่อน +1

    FYI - You can not import unless your APK already has IAP implemented. 9:10

  • @Kanookoochn
    @Kanookoochn ปีที่แล้ว +1

    hi did you know how to make server side checking when purchase complete?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I haven't specifically looked into that, but my understanding is you have your own server and call the google play or app store API with the token received on purchase complete.

  • @chrislaid214
    @chrislaid214 ปีที่แล้ว +1

    Hi I'm currently following your tutorial and I'm in the Export To Google Play section, but on the Google Play Console it doesn't have export option. Instead there was this Message saying "Your app doesn't have any in-app products yet
    To add in-app products, you need to add the BILLING permission to your APK"

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      That usually means the version of your app that you uploaded did not include IAP. First build your game and upload it with Unity IAP in the game with no products, then it should start working for you.

    • @chrislaid214
      @chrislaid214 ปีที่แล้ว

      @@LlamAcademy thank you very much for the quick reply, I'll look into it

    • @chrislaid214
      @chrislaid214 ปีที่แล้ว +1

      @@LlamAcademy Thanks bro! that solved my issue.

  • @SeverskiyS
    @SeverskiyS 9 หลายเดือนก่อน

    Hello! Thanks for information! Very helpful video! Can you please answer, why do you load Texture2d from Resources, and noat a Sprite? Is this because optimisations reasons? Or because something else?

    • @LlamAcademy
      @LlamAcademy  9 หลายเดือนก่อน +1

      I found it easier to put the textures there and create the sprite, but if you load a sprite from the resources folder it should work the same.

  • @Yesishootmodels
    @Yesishootmodels ปีที่แล้ว

    how can i do a subscription iap for my unity game i need help!!!!!

  • @LostSol25
    @LostSol25 ปีที่แล้ว

    Do they code the Ui in professional environments, this is a new thing for me haha nice tutorial!

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      When you need Dynamic UIs, sometimes it just makes sense 🙂

  • @duylongchau8042
    @duylongchau8042 4 หลายเดือนก่อน

    I wish Apple supports the IAP xml. For small game it's ok to use AppStore but for big game setup 50-100 products at a time is driving me mad.

    • @LlamAcademy
      @LlamAcademy  4 หลายเดือนก่อน

      Me too :( very sad they stopped having an upload mechanism.

  • @FabrizioCoppolecchia
    @FabrizioCoppolecchia 11 หลายเดือนก่อน

    Nice video thank you, do you know how to handle new device ? If i change device and log again with same user , how to restore all purchases? Must be saved all on cloud save or the play/app store take care of that? For example if i have the "remove Ads" purchase item and i want to link that purchase to the google accunt.

    • @LlamAcademy
      @LlamAcademy  11 หลายเดือนก่อน

      Yeah for these you'll need some cloud save for the purchases. Another person was asking similarly for how to handle adding different entities to the player. I handled all this more or less the same way because for my game I used PlayFab so it was the "source of truth" for all player data. Regardless if the player is using 5 devices, any unlocks are stored on their account so they don't have to repurchase it.

  • @VEETEEGameStudio
    @VEETEEGameStudio ปีที่แล้ว +1

    it keeps saying i amnot authorize to set the liscense key, and ive tried everything

    • @LostSol25
      @LostSol25 ปีที่แล้ว +1

      Same, did you fix it?

    • @VEETEEGameStudio
      @VEETEEGameStudio ปีที่แล้ว

      @@LostSol25 nah ... I guess it's a bug because it doesn't affect the build whatsoever the IAP still works fine

  • @HikikomoriDev
    @HikikomoriDev ปีที่แล้ว +1

    What if I wanted to implement crypto payments in-app?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      That would be a totally separate system to support payments then. Unity IAP supports interfacing with a Store, but the Store is the one that actually processes the payments.

  • @light-light
    @light-light 5 หลายเดือนก่อน

    I met failure says store initialize failed, I checked both at true (auto initialize) at unity catalog. Is it reason?

  • @andrelittle1230
    @andrelittle1230 ปีที่แล้ว +1

    Hey Chris great video as usual. I was wondering can you do a video on how to setup azure for git inside of vs and an example of pushing code and assets from unity. Thanks in advance

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Hey! Have you see this video?
      th-cam.com/video/vq5zuXBzlW8/w-d-xo.html I cover much of how to set up a git project on both Azure DevOps and GitHub and how I handle pushing code for solo projects in most cases.

  • @WebBusiness
    @WebBusiness ปีที่แล้ว

    how to use with pricing template

  • @lalalala99661
    @lalalala99661 ปีที่แล้ว

    In the Project Settings the update is saying you are not authorized will send an e-mail from unity to tell you Legacy Analytic is no longer working. instead it tells you to install the UGS Analytics SDK.

  • @sahilshaikh3454
    @sahilshaikh3454 ปีที่แล้ว

    getting error you are not verified to verfy key

  • @neilfosteronly
    @neilfosteronly ปีที่แล้ว

    At 15:22 using a capital E "ExtensionProvider" created an error at 15:32. I used "private IExtensionProvider extensionProvider;" instead.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Glad you got it working!

  • @r.allenposchii9082
    @r.allenposchii9082 ปีที่แล้ว

    Hello, I am trying to figure out how to check if an item is consumable or none consumable this I don't think you covered that yet could you help me out on this pleases.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Hi! On the product, you specify if it is consumable or not. When processing the purchase it tells you which specific product was purchased along with the attributes, so you can find based on the product if it is consumable or not

  • @johndee2091
    @johndee2091 6 หลายเดือนก่อน

    Does the tutorial provide receipt validation ?

    • @LlamAcademy
      @LlamAcademy  6 หลายเดือนก่อน

      I briefly mention what you need from the Unity IAP package to do it, but I do not cover exactly how to handle receipt validation in this video.

  • @Hi_Names_Nat
    @Hi_Names_Nat ปีที่แล้ว

    I followed this guide but the payout is always null when I get the catalog item. Is this an issue with not having the Google Play key inside of Unity Dash yet?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      If you are reading the IAP Catalog the payouts should always be present because it's there in the Product Catalog JSON file. Can you double check your code and configuration? Or maybe share your code?

    • @Hi_Names_Nat
      @Hi_Names_Nat ปีที่แล้ว

      ​@@LlamAcademy Still having this issue. I've realized my problem is in the builder, and it doesn't actually grab the payout there either. I've checked everything over quite a few times, so i'm pretty sure my code is fine, but ill share it if i really need to. My only thing i think it could be is the google play key, for whatever reason I can't add it, is that *required*? I wouldn't think so.

  • @barbariankinggamer3366
    @barbariankinggamer3366 ปีที่แล้ว +1

    I still get the error "You are not authorized to set the license key" even after i toggle Legacy Analytics On/Off and i have already set it in the dashboard. Any help?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      Make sure now that both Legacy Analytics and IAP are turned ON and try to restart the editor to see if that helps

    • @barbariankinggamer3366
      @barbariankinggamer3366 ปีที่แล้ว

      @@LlamAcademy i get an email that Legacy Analytics is no longer in use every time i try to turn it on. But ill try that and see how it goes

    • @barbariankinggamer3366
      @barbariankinggamer3366 ปีที่แล้ว

      @@LlamAcademy I restarted the project and the Lecagy Analytics window is gone and am still getting the error. Any advice?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Which version of Unity are you using 2021?

    • @barbariankinggamer3366
      @barbariankinggamer3366 ปีที่แล้ว

      @@LlamAcademy 2021.3.6f1

  • @newpopulargames1
    @newpopulargames1 ปีที่แล้ว

    Hi i searched whole internet and cant find info, i have IAP integrated in Unity game that works fine on Google Play and AppStore but now i need it to work for Windows Store, what to do after switch to UWP for Windows Store, is there any changes to make in Codeless script except ID of iap item?? Any advice? Tnx

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      It should just be the ID and following the same kind of process to configure the UWP IAP items on their store. I haven't released on UWP/Windows Store so unfortunately I don't have any guidance on that side of things.

    • @newpopulargames1
      @newpopulargames1 ปีที่แล้ว

      @@LlamAcademy thanks, i will try then.

  • @parhamrezaee6996
    @parhamrezaee6996 ปีที่แล้ว

    Iap button(lagacy) has been deprecated pls use codelss iap button instead, i keep getting this error, pls make a video on unity iap 4.93 and new iap button

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I checked out the documentation, there is very little difference between the two. Did you try using the other button?

  • @svenwork3511
    @svenwork3511 8 หลายเดือนก่อน

    can this work on steam as well?

    • @LlamAcademy
      @LlamAcademy  8 หลายเดือนก่อน +1

      I think for it to also work with Steam you would need to custom implement the Steam Store. Unity has provided implementations for App Store & Google Play Store but Steam is not supported out of the box.

  • @DanielWicht
    @DanielWicht ปีที่แล้ว

    Thanks a 1000 times for this great video! After adapting the code to my needs I had the problem that "private void HandlePurchaseComplete()" was never called. I guess I did sth wrong but maybe you want to double check if it really works as intended.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      Hey! I'm glad you found it helpful. I did test this with a fully deployed test app and my own mobile game is even using this same paradigm. It is hard to say exactly what may be wrong, but you can always compare what you have against what's in the GitHub repository to see if there was something small missing!

  • @erjuanjojj
    @erjuanjojj ปีที่แล้ว

    Do you know if this can be managed via IronSource API? I have ads managed with it and would be nice if you can also manage In App Purchases

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Sorry, I don't have any experience with IronSource to be able to answer this. I set up UnityAds a few years ago but it may be different now that IronSource is in the mix

  • @GameDeveloperTR
    @GameDeveloperTR ปีที่แล้ว

    Placeholders (sold items) do not come on iphone. what could be the reason for this?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I'm not sure I understand this question. You mean you can't view already purchased items?

    • @GameDeveloperTR
      @GameDeveloperTR ปีที่แล้ว

      @@LlamAcademy While iap store is displayed properly on android devices, items sale are not displayed/loaded on IOS devices.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      ​@@GameDeveloperTRDo you get any error or does it just give you an empty page? I had some errors when I didn't have the App Store version available on TestFlight yet.

  • @GameDeveloperTR
    @GameDeveloperTR ปีที่แล้ว

    Hello. I applied the tutorial to my own project. The internal test version does not make a real purchase. It opens the fake store just like in the editor. How can I make a real purchase?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      You will need to disable/undo the fake store code we put in late in the video and initialize it with the real store. We initialized with a fake store just for the demo.

    • @GameDeveloperTR
      @GameDeveloperTR ปีที่แล้ว +1

      @@LlamAcademy Thank you. You've been very helpful. respect

  • @adslpiulentoditalia2545
    @adslpiulentoditalia2545 ปีที่แล้ว

    Is there a way to assign directly a SetupModel quantity to give goods after we succed to buy currency

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I set up “bundles” as items that granted currency and items. In the “data” field where you can specify arbitrary data, I put JSON for how much currency, and which items should be unlocked. Then when processing bundles, I would parse that data and add currency or unlock items.

    • @adslpiulentoditalia2545
      @adslpiulentoditalia2545 ปีที่แล้ว

      @@LlamAcademy why make this such overcomplicated? Can't I just providing it directly into OnPurchaseProcessing ()? Like using switch statement?

  • @tunahancoskun3375
    @tunahancoskun3375 ปีที่แล้ว +1

    Hello , Is this how it is done for Photon?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      I don't think Photon and IAP have much to do with one another. Maybe you would do server-side validation of an IAP receipt and validate it. I did not cover that piece here, but you can read more about the receipt validation here: docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html

    • @tunahancoskun3375
      @tunahancoskun3375 ปีที่แล้ว

      @@LlamAcademy So can you make a video about it? Difficult to find help online

  • @rajsah4667
    @rajsah4667 6 หลายเดือนก่อน

    Does this work for webgl?

    • @LlamAcademy
      @LlamAcademy  6 หลายเดือนก่อน

      I believe For WebGL you will have to implement your own store (can’t use the Unity-provided Store implementation for google play / App Store since you’re not on that store). This concept can still be used but there is more work involved

  • @neilfosteronly
    @neilfosteronly ปีที่แล้ว +1

    I got everything working but still a bit confused on how the PurchaseProcessingResult works. I followed your "Learn how to persist data in your game" tutorial.
    If the user goes on a new device how would they reload what they have bought? Any docs on this as my searches are pulling up nothing. Is there some built in way for android and apple to reload the data from last device played?
    Also your link for "Learn how to persist data in your game" is not working.
    Thanks for the videos. Last two weeks keeping getting your videos shown when looking for solutions.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      Hey 👋 For persisting data across devices you'd need some system to "back up" what the user has purchased. In my game I was using PlayFab as the backend that, if you purchased anything, it was automatically persisted because I stored the user's "inventory" on PlayFab and all purchases were to grant currency or unlock items.
      Depending on your game, you could use a similar process, or even just persist a data file on the Google or Apple services so they're tied to the user's account. Once the user logs in you could pull that data and automatically they would get the majority of purchases back.

    • @helloyou191
      @helloyou191 ปีที่แล้ว +1

      @@LlamAcademy hey, could you please elaborate the process on " persist a data file on the Google or Apple services so they're tied to the user's account" ? How's this service called, so I can gather more information about this on the internet?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +2

      Sorry for the delay here. Google Play Services and Apple Game Center. You have to opt-in to those and do some set up which you can see on the Google Play Console / App Store Connect. Each comes with their own SDK and you can choose which features to use and enable.

  • @dedz
    @dedz ปีที่แล้ว

    its saying that I need to add permission for BILLING in the SDK when trying to upload the csv file into google play store

    • @dedz
      @dedz ปีที่แล้ว +1

      Just got it! You need to upload a version with the new In app purchase package. If he said that, I am sorry

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      glad you got it working!

  • @user-df6zt6yi9c
    @user-df6zt6yi9c ปีที่แล้ว

    how do i update the IAPProductcatalog.json file?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      This is generated by making changes in the inspector like we did early in the video.

  • @brunozelic6576
    @brunozelic6576 ปีที่แล้ว

    Is there a way to verify the purchase on my own server? Im using my own server databases to store item data so I want to avoid any potential cheating on the client side. Maybe some kind of reciept that verifies a transaction has been made?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Google and Apple both have server side receipt validation: docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html
      You can implement your own receipt validator to do whatever you need to on your side. When I implemented this, I did not do server validation, but you can wait for the validation to apply whatever changes should be there for the purchase

    • @brunozelic6576
      @brunozelic6576 ปีที่แล้ว

      @@LlamAcademy Thanks, Solved it with googles verification api for python. Although it was waay too complicated to setup. Too many steps and no solid info anywhere. Seems like a good idea for a future tutorial if you need one! :)

  • @drunk3np1nky40
    @drunk3np1nky40 ปีที่แล้ว

    For Whatever reason I get error "Purchase not correctly processed for product "myProductName". Add an active IAPButton to process this purchase, or add an IAPListener to receive any unhandled purchase events."
    I have "Initialize Unity.Purchasing automatically" unticked. And I don't have any IAPButtons or IAPListeners in my scene, cause mixing Codeless IAP and Coded one is strictly not advised. But it only works with "Initialize Unity.Purchasing automatically" ticked and actually refers to my IStoreListener (But UnityPurchasing.Initialize() does the same thing). My custom buttons use the same editor functionality as IAPButton has (not to input string manually but to choose id from catalog directly). But I don't believe this is the case. Has anyone faced the same kind of problem? Anyway thank you very much! It's a great introduction to Coded IAP.

    • @drunk3np1nky40
      @drunk3np1nky40 ปีที่แล้ว +1

      Well, the answer is obvious. The order is important. You have to wait until unity services initialize before calling UnityPurchasing.Initialize() 😁

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      😁 glad you figured it out, and thank you for sharing the answer as well!

  • @jerecodelacruz9252
    @jerecodelacruz9252 ปีที่แล้ว

    Is there any option to lower down the minimum android API requirements in the play store?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      You can have a lower minimum version, but the target must be the latest one Google requires. These two drop downs do not have to be the same number.

  • @GameDeveloperTR
    @GameDeveloperTR ปีที่แล้ว

    I get an "StoreIconProvider has already been initialized!" error when I reset the scene. can ı help you?

    • @EdgarRdzG09
      @EdgarRdzG09 ปีที่แล้ว +2

      I don't know if you already solved it, but the error is in that the dictionary is not created well, what you can do is to initialize it at the moment of entering to the Initialiaze method, it would be something like this:
      public static Dictionary Icons { get; private set; }
      public static void Initialize(ProductCollection products)
      {
      Icons = new Dictionary();
      if (Icons.Count == 0)
      {
      Debug.Log($"Loading store icon for {products.all.Length} products.");
      TargeticonCount = products.all.Length;
      foreach (Product product in products.all).
      {
      Debug.Log($"Loading store icon in path StoreIcons/{product.definition.id}");
      ResourceRequest operation = Resources.LoadAsync($"StoreIcons/{product.definition.id}");
      operation.completed += HandleLoadIcon;
      }
      }
      else
      {
      Debug.LogError("StoreIconProvider has already been initialized!");
      }
      }

    • @OwenWithDaB
      @OwenWithDaB 6 หลายเดือนก่อน

      You are a life saver!@@EdgarRdzG09

    • @OwenWithDaB
      @OwenWithDaB 6 หลายเดือนก่อน +1

      also, not sure if this happened to you, after fixing the dictionary, I ran into the error: MissingReferenceException: The object of type 'DemoStorePage' has been destroyed but you are still trying to access it.
      What I did is add a function of OnDestroy:
      void OnDestroy() {
      StoreIconProvider.OnLoadComplete -= HandleAllIconsLoaded;

      }
      this solve my problem, hope this is helpful😃

  • @maxg5196
    @maxg5196 ปีที่แล้ว +1

    Great video. I have recently been thinking about adding cosmetic purchases to the game I am making. My game will be a browser game, played through the WebGL export however. What would be the differences between what you showed here and creating IAP purchases for WebGL? Or would you need to use a different system then Unity IAP entirely?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      For WebGL, I think you can do the same process here, but you’d have to implement a custom store like they define here: docs.unity3d.com/Manual/UnityIAPImplementingAStore.html
      Which is totally doable, but it becomes fully your responsibility to do the integration with Shopify or whatever store you’re trying to use on WebGL.

  • @jhgfghjfuzrtfchchghgf
    @jhgfghjfuzrtfchchghgf ปีที่แล้ว

    When I try to upload the csv to Google Play, I get the error: Row 2: Missing the listing for the default language.
    It shows that for every row. the selected language in unity is the default: English (US). Do you know how to fix that?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      Strange one. Can you try to update the value of the dropdown to something other than english, then change it back to see if it resolves it?

    • @Danny1y5
      @Danny1y5 ปีที่แล้ว

      Having the same problem. Did you find a fix?

    • @recriandogames
      @recriandogames ปีที่แล้ว

      Same problem here

    • @LostSol25
      @LostSol25 ปีที่แล้ว

      Had the same problem

    • @online.fabian
      @online.fabian ปีที่แล้ว

      You need to ad a translation in your default Language

  • @INeatFreak
    @INeatFreak ปีที่แล้ว +3

    I hyperventilate every time see someone using PascalCase for the variable names

    • @INeatFreak
      @INeatFreak ปีที่แล้ว

      use camelCase or snake_case or anything but that. It's so easy to confuse a variable with a class/struct type that way.

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว +1

      👀🙃

  • @lorenzoluis6440
    @lorenzoluis6440 ปีที่แล้ว

    Olá, quero rodar um joguinho quem fica responsável pelos pagamento aos jogadores? Sou eu ou o Unity?

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      You are responsible to pay users out if you want to give them real currency. Even with Unity IAP, Unity does not collect the money. They're just providing a layer of abstraction over each of the stores that actually handles the purchasing and billing.

  • @ozgungor2339
    @ozgungor2339 ปีที่แล้ว

    𝗡𝗲𝗲𝗱 𝗛𝗲𝗹𝗽
    I pasted the id from the google play store but it gave an error "You are not authorized to set the license key" and then I go to the Legacy Analytics to make it work. But however I don't have Legacy Analytics in the sections or services. I tried to download it from the Package Manager but it was not there. I need help.

  • @laniakeadev.2271
    @laniakeadev.2271 ปีที่แล้ว

    Does not work on mobile. Stucks on " UnityPurchasing.Initialize(this, builder);"

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      What error do you get?

    • @laniakeadev.2271
      @laniakeadev.2271 ปีที่แล้ว

      @@LlamAcademy np errors. Fixed by moving next operators to OnInitialized and enabling auto-initialization

    • @LlamAcademy
      @LlamAcademy  ปีที่แล้ว

      @@laniakeadev.2271 oh, great! I'm glad you got it working!