Newbie question about IAP system.
Hi! I'm recently bought this asset with a hope it will suits my need. I will start working with at the weekend. But i've got a question that it will work with iap or not. I made a tower defense style game with no currency on it, i will use virtual currency from iap and player will get it at the end of each level, thats simple. But i like to add buyable skins to the game, i mean theres a default skin for every tower, if a player buys a skin that will apply to towers. The game core mechanics is completed and works with prefabs, when i add a tower to map it created from prefabs, thats why i think the easiest way if i use the gamemanager settings for that, it stores data and carring over all scenes and i add a new line to the gamemanager that calls selected item (skin) from shop and it will give and ID for it, like default tower is TS0 and skin1 is TS1. And on the prefabs models i just need a script that reads the id and change the prefab material with an If parameter. I hope it can be understandable how i wrote my needs, im not native english but i try my best :)
Baroni last edited by
if you would like to swap out towers based on the puchased+selected skin, there is no need for a complicated logic, as you have all IAP information on your hands (in our DBManager).
The way I would do this, is to add an IF check at the tower instantiation code. If a skin is selected, instantiate tower2. Else, instantiate tower1. You can find the public methods to check for what is purchased and selected in our scripting reference.
Hope this helps as I could not closely follow what you mean by gamemanager and IDs.
@Baroni thanks for your reply. I've got a gamemanager gameobject in mainmenu, it stores the data like music volume sfx volume etc and its not destroying when i load another scene (level). My logic was, when i first login the game, the shop have a default skin loaded and equipped, equip means it sends an ID to the game manager script, if i change the skin it will change the value in the game manager, and when i load a scene the gamemanager will still on the scene with the value i chosen from shop, and the prefab towers is checking for the id and changing the material for the selected id. But maybe theres an even simplier version to change skins, i havent looked the documentation.
Baroni last edited by Baroni
I would suggest looking at our youtube video, documentation and scripting reference first :)
Based on your explanation you are basically duplicating existing functionality. The DBManager keeps all the values already, you don't need them in your "GameManager". Also our ShopManager keeps previous selections and purchase states, so no need to save any IDs manually there either.
I asked before i checked it. Nice, everything i need is there :) Thank you!