title: Unity struct is serialized, but not editable from component menu
body: <p>I have a struct in Unity which is declared like this:</p>
  
  <pre><code>[System.Serializable]
  public struct IntVector2 {
      public int x, z;
  
      public IntVector2 (int x, int z) {
          this.x = x;
          this.z = z;
      }
      public static IntVector2 operator + (IntVector2 a, IntVector2 b) {
          a.x += b.x;
          a.z += b.z;
          return a;
      }
  }
  </code></pre>
  
  <p>Then, I added an <code>IntVector2</code> as a field on a script. When I looked at the script component on the sidebar, the struct and its variables were nowhere to be found. What am I doing wrong?
  EDIT: Here is the code of my script:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class Maze : MonoBehaviour {
  public IntVector2 size;
  
  public MazeCell cellPrefab;
  
  private MazeCell[,] cells;
  // Use this for initialization
  void Start () {
  
  }
  
  // Update is called once per frame
  void Update () {
  
  }
  public MazeCell GetCell (IntVector2 coordinates) {
      return cells[coordinates.x, coordinates.z];
  }
  public float generationStepDelay;
  public IEnumerator Generate () {
      WaitForSeconds delay = new WaitForSeconds(generationStepDelay);
      cells = new MazeCell[size.x, size.z];
      IntVector2 coordinates = RandomCoordinates;
      while (ContainsCoordinates(coordinates) &amp;&amp; GetCell(coordinates) = null) {
          yield return delay;
          CreateCell(coordinates);
          coordinates += MazeDirections.RandomValue.ToIntVector2();
      }
  }
  
  private void CreateCell (IntVector2 coordinates) {
      MazeCell newCell = Instantiate(cellPrefab) as MazeCell;
      cells[coordinates.x, coordinates.z] = newCell;
      newCell.name = "Maze Cell " + coordinates.x + ", " + coordinates.z;
      newCell.coordinates = coordinates;
      newCell.transform.parent = transform;
      newCell.transform.localPosition = new Vector3(coordinates.x - size.x * 0.5f + 0.5f, 0f, coordinates.z - size.z * 0.5f + 0.5f);
  }
  
  public IntVector2 RandomCoordinates {
      get {
          return new IntVector2(Random.Range(0, size.x), Random.Range(0,       size.z));
      }
  }
  
  public bool ContainsCoordinates (IntVector2 coordinate) {
      return coordinate.x &gt;= 0 &amp;&amp; coordinate.x &lt; size.x &amp;&amp; coordinate.z  &gt;= 0 &amp;&amp; coordinate.z &lt; size.z;
  }
  }
  </code></pre>
  
  <p>The one that is not shown is <code>size</code></p>