playMaker

Author Topic: Need help with a Unibill IAP script!  (Read 3195 times)

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Need help with a Unibill IAP script!
« 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/

Code: [Select]
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!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with a Unibill IAP script!
« Reply #1 on: August 14, 2013, 08:51:18 AM »
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