// Use this for initialization public void SetPaymentMethods(XsollaPaymentMethods paymentMethods) { _paymentMethods = paymentMethods; if(adapter == null) adapter = GetComponent<PaymentMethodsAdapter>();// gameObject.AddComponent <PaymentMethodsAdapter>() as PaymentMethodsAdapter; adapter.SetManager (_paymentMethods); gridView = GetComponent<GridView> (); gridView.SetAdapter (adapter, 6); }