As the title suggests, my game in UNITY is a choice based decision game. I have made cloud function for adding currency and reducing currency by 1 and run a for loop to "spend the currency" for example for(i=0;i<20;i++)
{
reduceCurrency();
}
This doesn't seem to work though, sometimes it only deducts 9, sometimes 10 from the playfab's player currency.
Maybe if i can actually just access the currency into my script, I can put conditions for it with the currency in my UI? which isn't the same as of now. I initialize my UI currency with the same value that i put into my player's through a cloudscript function.
How can I connect my UI to the playfab ? How can I pass in values to the cloudscript to add/subtract certain amount from the wallet?
How do I implement Game Currency into my cost based decision making game ?