I've updated to NGUI 3.99 and my popup lists are no longer working correctly. They've been fine for over a year so I'm not sure what happened.
Basically, when I click an item in the popup list, if it's the first item in the list, it won't register an event. If I click a different item, it registers, and then I can click any of them and they'll work. The first item, in other words, won't register an event until another item is clicked.
Here's the code I've got on the popup list to intercept the clicks:
using UnityEngine;
public class UIpopupList_For_Editor : MonoBehaviour {
private UIPopupList popupList;
public morphHandler theMorphHandler;
void Awake()
{
UIPopupList popupList = GetComponent<UIPopupList>();
EventDelegate.Add(popupList.onChange, SetSliderWindow);
}
public void SetSliderWindow ()
{
Debug.Log("Selection: " + UIPopupList.current.value);
theMorphHandler.SetupMorphSliders (UIPopupList.current.value);
}
}
Nothing happens when I click the first item in the list, not even the Debug.Log.