public static PaymentModalPanel GetInstance() { if (!instance) { instance = FindObjectOfType(typeof (PaymentModalPanel)) as PaymentModalPanel; if (!instance) Debug.LogError ("There needs to be one active ModalPanel script on a GameObject in your scene."); } return instance; }
// Use this for initialization void Start() { // Get a modal panel to use for purchase confirmation modalPanel = PaymentModalPanel.GetInstance(); confirmationString = "Are you sure you want to buy this item?"; // Do nothing for now cancelAction = new UnityAction(Cancel); PurchaseYinYanVanity(); }
// Use this for initialization void Start() { // Obtain an instance of the modal panel modalPanel = PaymentModalPanel.GetInstance(); }