title: UnityEvent with array showing null reference Error
body: <p>This is the code snippet. Whats I am doing wrong.</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using UnityEngine.Events;
  
  public class UnityEventSystemDemo : MonoBehaviour {
      UnityEvent[] objUE;
  
      // Use this for initialization
      void Start () {
  
          objUE = new UnityEvent[2];
          objUE[0].AddListener(CustomEvent);///Null ref at this point
          objUE[1].AddListener(CustomEvent);
  
      }
  
      // Update is called once per frame
      void Update () {
  
          if (Input.GetMouseButtonDown(0)) {
              Debug.Log("left clicked..");
              //calling Events
              objUE[0].Invoke();
              objUE[1].Invoke();
          }
  
      }
  
      void CustomEvent() {
  
          Debug.Log("customEvent..");
  
      }
  
      void CustomEvent1()
      {
  
          Debug.Log("customEvent1..");
  
      }
  }
  </code></pre>
  
  <blockquote>
    <p>NullReferenceException: Object reference not set to an instance of an
    object UnityEventSystemDemo.Update () (at
    Assets/Scripts/UnityEventSystemDemo.cs:23)</p>
  </blockquote>