Hey everyone, i have a button that handles IAP for a specific non consumable. that button has a script that handles that and i disable it once that set has been purchased. Now i want to add an on click event to that button but i want to do it like i did in the inspector. assign another game object to it and choose a function, and well im having troubles! any help would be appreciated!
to be more specific i have a dataManager gameobject in the scene that has this code in the start function:
public void Start()
{
if (PlayerPrefs.GetInt("AnimalSet") == 1)
{
AnimalCard.GetComponent<BuySetButton>().enabled = false;
}
and what i want under that is to do something like add MenuManager gameObject to that onclick event and use the OpenLevel(2) function!