Button Buy - with this component, you can set a price, hide the icon, and subscribe to the button onClick event.
Button - link to the button.
QUESTIONS:
How to set price? - Invoke SetText(string price);
[SerializeField] private ButtonBuy _buttonBuy;
private void Start()
{
_buttonBuy.SetText("100");
}
2. How to hide icon?
[SerializeField] private ButtonBuy _buttonBuy;
private void Start()
{
_buttonBuy.HideIcon();
}
3. How to subcribe onClick event?
[SerializeField] private ButtonBuy _buttonBuy;
private void Start()
{
_buttonBuy.Button.onClick.AddListener(OnButtonClick);
}
private void OnButtonClick()
{
Debug.Log("Button clicked");
}