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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Simple In-App Purchase System (SIS) - Shop solution

Discussion in 'Assets and Asset Store' started by Baroni, Aug 8, 2013.

?

Which billing plugin are you using in combination with Simple IAP System?

  1. Unity IAP

    152 vote(s)
    84.9%
  2. Voxel Busters

    10 vote(s)
    5.6%
  3. Stans Assets

    13 vote(s)
    7.3%
  4. Prime31

    4 vote(s)
    2.2%
  1. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    Hi @mechangel,

    If you still not fixed your problem, try to create a camera in your scene, then change the Render Mode to Screen Space Camera , attach the created Camera to Render Camera, then build your apk, this should work :p
     
    Baroni likes this.
  2. mechangel

    mechangel

    Joined:
    Nov 6, 2012
    Posts:
    73
    @Baroni no worries, I was trying not to clog the forum with a bunch of posts. Not having the Store Key is b/c I was just running a test project with the example items in the test scenes, it doesn't normally impact anything except purchases and isn't needed for in-game currency purchases. I do have the store key in my actual project but get the same display issues. And YES! Device only is so hard to debug! It looks perfect in the editor! I've tried on 3 different phones with results that range between no items showing, to the tiny scroll view giving a peek at the items. They even scroll properly when dragged. I'll try playing around with the scroll rect area and see if I can get it to scale for me.
     
  3. mechangel

    mechangel

    Joined:
    Nov 6, 2012
    Posts:
    73
    That did it!!!! Thanks for the help! Now I can start fiddling around with making it bigger in customized prefabs. I knew it had to be something simple. =D
     

    Attached Files:

    RoyalCoder likes this.
  4. RoyalCoder

    RoyalCoder

    Joined:
    Oct 4, 2013
    Posts:
    301
    I'm very glad it worked ! Now the sky's the limit :)

    Cheers
     
  5. PlayKiseki

    PlayKiseki

    Joined:
    Oct 4, 2014
    Posts:
    14
    Hi Baroni! Is there any guide or tutorial on using SIS for Amazon?
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hey! It's basically the same as for Google Play, but you have to follow Amazon's in-app purchase steps (especially using the App Tester and JSON file with IAP data) for a successful testing environment.
     
  7. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hi Baroni, what is the best way to update SIS in an existing project (I am moving from Unity 4.6.1 to 4.6.4).

    Delete the SIS folder and reimport the newer SIS? Or just import SIS and let it overwrite everything.

    Also, are the IAP Settings stored somewhere externally, like in an XML file? I don't want to type them all in again. Thanks!
     
    Last edited: Apr 5, 2015
  8. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    While I'm waiting for your reply, I just downloaded SIS 2.5.1 into a clean new project in Unity 4.6.4p1.

    None of the buttons are clickable in the SIS sample scenes. Can you tell me if you are seeing the same behavior?
     
  9. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hey, I'll just leave this link here. Products are stored in the IAPManager prefab.

    I didn't test patch releases, but it's working fine on Unity 5. Maybe the Event System gameobject is missing, or the UI doesn't receive any input? Could you test this by adding a button (and in a different scene)?

    I've set up my computer over the holidays, so I can't test this at the moment.
     
  10. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Thanks Baroni, it seems like in 4.6.4p1, that panels and buttons (even if they are not active) block the input of buttons underneath them. This didn't happen in 4.6.1. I haven't tried Unity 5 yet.

    I'll keep playing around with things to see what else I can discover
     
  11. Jaynesh

    Jaynesh

    Joined:
    Feb 28, 2015
    Posts:
    36
    Hello,

    Great plugin.

    Is there an easy solution of displaying all items that have been unlocked with coins? I have unlockable characters and when the user buys a character with coins I would like them to choose which one they would like to play this.
     
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hi Jaynesh, not that easy I guess.

    You could start by showing all characters in a list, like in the shop scene. Then go over their ids, check if they have been purchased (DBManager.isPurchased) and disable not unlocked items (ShopManager.GetIAPItem(id).gameObject). This will leave you with only unlocked items in a list.
     
  13. Ramon78

    Ramon78

    Joined:
    Nov 22, 2014
    Posts:
    1
    Hello,

    in IAP Settings, how I can switch of the Android platform to iOS platform?. I installed OpenIAB ..
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hi Ramon, the settings are cross-platform. You can expand the little foldout next to the id to specify platform overrides, if needed.
     
  15. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    I had everything working but all of a sudden I started having problems.
    When I open up the shop it immediately gives the user the $.99 item, and every time I click it, it will give me the $.99 cent item over and over.
    Then if i click on any of the other purchasable items, it will do the normal pop up to purchase and work correctly like it's supposed too, but if I try to do the $.99 item again, it will start to say "purchase failed"
    I'm having the problem for android.
    Any help would be awesome!
     
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Do you have any custom code accessing IAP functionality? Is the product consumable and does this happen in the default sample scene too?
     
  17. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    I don't have any custom code accessing it, and it actually started happening without me changing any code anywhere.
    It is a consumable and I'm using Unibill.
    I haven't messed with SIS or unibill in a long time since everything has been working fine.
    Is the IAP Manager supposed to have a Server Url?
    And for the verification type should it be On Purchase and Remote type Overwrite?
    I think the problem started when I noticed some of my scenes had those settings and others were set to none.
    I tried changing it to both none and the above settings but it doesn't work.
    The only custom code I use is in the IAP Listener to give the rewards but each consumable does the same thing just different numbers, and I haven't touched any scripts.
     
  18. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    Everything is working fine in the Unity editor with no problems..
    Also it sometimes will put a duplicate of each of my IAP items when the shop opens up.
    Not sure why this is happening
     
  19. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    Whats weird is i just built to another device and it works fine but not on my tablet
     
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Server Url is for receipt verification, remote type is for dynamic product data (two different things, see documentation)
    Make sure you only have one IAPManager in the first scene of your app and nowhere else. This and the duplicated IAP items can be caused by having multiple IAPManager prefabs.

    Also for the initial issue, try enabling the "debug" checkbox in the inspector for the ShopManager/IAPManager/IAPListener scripts and see what the device log reveals. It could help to get to the bottom of this...

    Testing IAPs is sometimes a complex beast ;) Completely deinstall the app on the device between testing stages.
     
  21. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    There is only one IAP Manager prefab and only one per scene.
    It's still showing double.
    I will try putting it only in first scene.
    Should I make it Don't destroy on load?
     
  22. iEpic

    iEpic

    Joined:
    Sep 29, 2013
    Posts:
    119
    I also just started getting this error...

    You are trying to load data from a www stream which had the following error when downloading.
    <url> malformed
    UnityEngine.WWW:get_text()
    SIS.<RemoteDownload>c__Iterator39:MoveNext() (at Assets/SIS/Scripts/IAPManager.cs:577)
     
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    It already is, you only need one prefab across all scenes (only in the first scene).

    I don't think that you're using remotely hosted configs. Set the remote type to none.
     
  24. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Hello, Baroni i have a problem! I use NGUI, Unibill and SIS. I did everything according to instructions
     

    Attached Files:

  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hi, are you using the latest version of all packages (which one)?
     
  26. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Of course!
     
  27. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    @KeeLo
    I didn't see that Unibill changed some events in version 1.9.7, thanks for the pointer. I'm working on an update now, email me with your invoice to get it first.
     
  28. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    I have a question. So we have this Simple IAP scene. We want to be able to load the scene so we can access the store. What is the best way to do this? At the moment we are using LoadLevelAdditive and then set the HorizontalTabs' Canvas to inactive. Is this the best way to do this? Will this affect performance in say an android device? Someone suggested to add all the objects of the HorizontalTabs scene into our main scene, but how would that be different from using LoadLevelAdditive? Thank you. we are seeking guidance on how to integrate the HorizontalTabs into our MainScene.
     
  29. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    @v.megar.v there shouldn't be any difference between LoadLevelAdditive or having it in the main scene from the start. If the shop canvas is disabled, it doesn't affect performance at all. Depends on how you want to use it, I would add the shop menu to the main scene and activate it whenever needed.
     
  30. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    Thanks for your response. Any particular reason or why you prefer add the shop menu to the main scene over using LoadLevelAdditive?

    Thanks
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hmm not really, I just like to keep a reference to all UI elements in a script, that lives in the main scene and is easily accessible there.
     
  32. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    Got it! Thanks!
     
  33. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    choikeelo@mail.ru Thank you very much!
     
  34. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Version 2.5.2
    - Unibill: updated compatibility to latest version
    - DBManager: for upgrades, GetAllPurchased only returns the last one

    This is a maintenance release to get the newer Unibill versions up and running again. Also note that for all packages, if you check for purchases manually by using GetAllPurchased and use upgradeable products, starting from this version only the last product in the chain will be returned. E.g. if speed 1-3 are bought, only speed 3 is returned.

    @KeeLo fixed
     
  35. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    I have some error! what is it??
     

    Attached Files:

  36. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    if i don't want use purchase for real money should i use unibill ??
     
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Check your Unibill settings. Switching from Amazon to Google Play or saving it may help.

    I don't understand your question. If you are not using purchases for real money, it doesn't matter which billing plugin you use. Purchases for virtual currency are supported in our asset.
     
  38. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    I asked can i use SIS without any billing plugins like unibill, prime31 or other if i don't want use purchase for real money?
     
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    The IAPManager script is not meant for that, it expects a billing plugin. You could either modify the code and remove all billing related lines, or just import any billing plugin and do not use it at all.
     
  40. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    I managed to have the shop show up in my game while i was programming on my computer, but when I went to try it on an Android device the shop is not there.... what is going on?! :'( Is this usual? What did I miss? Any ideas or suggestions would be appreciated.
     
  41. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Please follow the FAQ section in the documentation for possible missing steps / hints and report back if you find an unsual log on your device.
     
  42. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    The 8 items on the FAQ section do not relate to my problem at all.
     
  43. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    The first one does. Products will not show up if you did not set up your Google Play account correctly or have any errors on the device. Have a look at the device log to see if it throws the first question.
     
  44. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    It is not that products are not showing up, it is the entire shop is not showing up at all, it is not visible on the android devices. When you click on the button that opens the shop you see nothing, even though it works fine on the computer when I run the game. Regardless of linkage, I assume you should see the user interface and backgrounds at the very least.
     
  45. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Oh, I misunderstood that. It doesn't look like an issue related to SIS though? Maybe try some settings on the canvas, a different scene or device and see how that's going? No UI elements at all is a bit strange. Sorry I can't be of much help here.
     
  46. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    No, you are right. It is not SIS related. It is something related to the way I use LoadLevelAdditive() At least I think. so. Working on a solution as we speak. Thanks for the feedback!
     
  47. Gamma42

    Gamma42

    Joined:
    Feb 3, 2015
    Posts:
    7
    Hello Baroni,

    I am having an issue and I am not sure what action to take first. I spent the better part of 3 days going through the pdf, forums(probably not as well as I should've), and and doing web searches. I have a project setup with 3 scenes. The IapManager is in my splash screen scene and I am all setup on the play dev console side. I only get two logs in the editor and its one for initialization of OpenIAB and a second sending a call for my specific product ID. All seems well. Earlier I was having an issue not seeing titles and descriptions while running in the editor but after following mechangels posts, and D0R1Ns solution made them visible.. I thought good, Im all set (because I had noticed that my items only showed up in editor(not on a built and signed apk at all). This didn't fix that though. My beta apk is published in my console and I have 1 initial IAP product active I am trying to test with. this kinda has me stumped, but I think it is something simple. I flip between my main menu, player shop canvas, and atm a vertical store canvas from the example. Any Ideas why I would see the canvas and its rect, scroll bar lights up and everything but the item only are missing???

    **It was actually my fault.. somehow while doing some house cleaning of some erroneous assets *ultimate mobile*, i accidentally chopped up my OpenIAB directory. My apologies for the premature post. Everything seems to be working fine. I do get a "not logged in" message when I test the purchase but it is an offline install. will try tomorrow when my file is uploaded and I can dl through gplay.***

    Thanks
     
    Last edited: Jun 4, 2015
  48. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,171
    Hi Gamma,
    make sure that you've added your email to the test account settings in Google Play. Google Play will also throw a misleading "not logged in" message if your bundle identifier does not match in Unity.
     
  49. Gamma42

    Gamma42

    Joined:
    Feb 3, 2015
    Posts:
    7
    I am actually about to deal with that now... I let the upload of new version take place last night and I purchased my beta app this morning and still ran into the issue. I have been going through logs and searching the web this morning and figured I would go through these forums again. Thank you for the response. I will check now.
     
  50. v-megar-v

    v-megar-v

    Joined:
    Mar 11, 2013
    Posts:
    28
    I am having a problem discussed previously. That is that now that i was able to make the shop display on the game, my items do not show up (They show up when I run it on the editor). Neither the google items nor the in game objects appear. I read the FAQ, and my prefabs are set with the correct parent. I also read this: "For Google Play, your developer key must be entered in the IAPManager prefab and your app has to be published as alpha/beta build, in addition to being logged in as a test user." How do I enter the key into the prefab? The only place I see where one can put the key is in the unibil editor,