Hello, I’m Beginners in Unity. Thank you a lot for reading my Questions.
Why i cant’t find the fucnction which gets more than one parameters in inspector?
(UGUI - Button-Onclick())
(no parameter, 1 parameter - each find, works well)
(2,3,4… parameters - Can’t find in OnClick() Inspector)
Here’s Code(Not that Long)using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ButtonCtrl : MonoBehaviour {
public Text ShowingText;
// Can Find in Onclick() Inspector
public void GetButtonName(Button bt)
{ ShowingText.text = bt.name;}
// Can Find in Onclick() Inspector
public void GetRectTransfomr(RectTransform rt)
{ Debug.Log(rt.position); }
// NOTE !! Can't Find in Onclick() Inspector
public void GetButtonNameNRectTransfomr(Button bt, RectTransform rt)
{ ShowingText.text = bt.name;
Debug.Log(rt.position); }
}
===========
Is there any reasons to prevent using more than 1 parameter fuctions in UGUI BUTTON?
Have a nice Day