public void Initialize(Key key, string gameObjectName, Transform parent) { this.key = key; callback = new ButtonPressCallback(this, Key); gameObject.name = gameObjectName; transform.SetParent(parent, false); localizedText.UnlocalizedContent = "keys." + gameObjectName.ToLower(); }
public MyButton(string str, ButtonPressCallback btnEvent) { this.text = str; this.buttonPressEvent = btnEvent; }