Xsolla.SavedMethodBtnController.setNameMethod C# (CSharp) Method

setNameMethod() public method

public setNameMethod ( String pNameMethod ) : void
pNameMethod String
return void
        public void setNameMethod(String pNameMethod)
        {
            _nameMethod.text = pNameMethod;
        }

Usage Example

        private void CreateMethodBtn(XsollaSavedPaymentMethod pMethod)
        {
            // Create object
            GameObject methodBtn = Instantiate(Resources.Load("Prefabs/SimpleView/_PaymentFormElements/SavedMethodBtn")) as GameObject;

            methodBtn.transform.SetParent(methodsGrid.transform);
            SavedMethodBtnController controller = methodBtn.GetComponent <SavedMethodBtnController>();

            listBtns.Add(controller);
            // Set method
            controller.setMethod(pMethod);
            // Set name
            controller.setNameMethod(pMethod.GetName());
            // Set Type
            controller.setNameType(pMethod.GetPsName());
            // Set icon
            imageLoader.LoadImage(controller._iconMethod, pMethod.GetImageUrl());
            // Set BtnList
            controller._btnMethod.onClick.AddListener(() => onMethodClick(controller.getMethod()));
        }
All Usage Examples Of Xsolla.SavedMethodBtnController::setNameMethod