void Awake() { if (instance == null) { instance = this; GameObject.DontDestroyOnLoad(this.gameObject); } else //Destroys unused instances { GameObject.Destroy(this); } }
public void restorePurchasesButton() { Soomla.Store.WonderRush.MasterControllerStore masterControllerStore = GameObject.Find("MasterControllerStore").GetComponent <Soomla.Store.WonderRush.MasterControllerStore> (); masterControllerStore.restorePurchases(); }
public void buyButton() { Soomla.Store.WonderRush.MasterControllerStore masterControllerStore = GameObject.Find("MasterControllerStore").GetComponent <Soomla.Store.WonderRush.MasterControllerStore> (); masterControllerStore.buy(); }