public int GetEventCount()
{
int arraySize = 0;
SerializedProperty property = this.Get("events");
if ((property != null) && property.isArray)
{
arraySize = property.arraySize;
}
return arraySize;
}