Hello, im using Field method of EventDelegateEditor draw EventDelegate field for my costume editor, and im getting Null refrence on multi-select of list variable. Adding
if (list != null && list.Any())
fixes problem, so please add it to NGUI. Thx =)
static public void Field (Object undoObject, List<EventDelegate> list, string noTarget, string notValid, bool minimalistic)
{
bool targetPresent = false;
bool isValid = false;
if (list != null && list.Any()) //<------ this check
{
// Draw existing delegates
for (int i = 0; i < list.Count;)
{
EventDelegate del = list[i];
if (del == null || (del.target == null && !del.isValid))
{
list.RemoveAt(i);
continue;
}
Field(undoObject, del, true, minimalistic);
EditorGUILayout.Space();
if (del.target == null && !del.isValid)
{
list.RemoveAt(i);
continue;
}
if (del.target != null) targetPresent = true;
isValid = true;
++i;
}
}