Browse Source

Added null check in ButtonClicked event handler

master
chrisgregan 9 years ago
parent
commit
5b21b661e0
  1. 3
      Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs

3
Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs

@ -14,9 +14,12 @@ namespace Fungus
public Button targetButton;
public virtual void Start()
{
if (targetButton != null)
{
targetButton.onClick.AddListener(OnButtonClick);
}
}
protected virtual void OnButtonClick()
{

Loading…
Cancel
Save