Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Horror on August 13, 2013, 07:25:33 AM
-
I love playMaker but occasionally I have to work with an unsupported SDK and I get stuck for hours on something that the average programmer could solve in 2 minutes...
I'm wondering if any of the more code savvy users here could take a look at this script. I'm running it by adding it as a component with the Add Script action.
Here's the doc:
http://outlinegames.com/unibill-documentation/
using UnityEngine;
using System.Collections;
using Unibill;
public class UnibillPurchaseUnlockAll : MonoBehaviour {
string unlockAll = "com.mesmermobile.abbottversusrudd.unlockall";
int unlockedIAP = 0;
void Start () {
Unibiller.onPurchaseComplete += onPurchased;
Unibiller.initiatePurchase(unlockAll);
}
private void onPurchased(PurchasableItem unlockAll) {
Debug.Log ("Purchased Unlock All");
unlockedIAP = 1;
PlayMakerGlobals.Instance.Variables.GetFsmInt("unlockedIAP").Value = unlockedIAP;
}
}
I'm not getting the Debug.Log readout, so I don't think the onPurchased part is even running... The playMaker variable certainly isn't going through.
Any help would be most appreciated,
Cheers!
-
Hi,
if you don't get that method called, then you don't have yet a problem with playmaker. you need to see why you don't get that call.
Do you have a sample demo provided with UniBIll? this would be your first stop to understand how everything is interlinked.
bye,
Jean