Instantiate not copying struct?

I'm trying to Instantiate an object with a struct inside, but it appears that all fields are set to 0. The following code is always returning "False True".

using UnityEngine;
using System.Collections;

public struct IntPosition
{
    public int x;
    public int y;
    public int z;
};

public class Test : MonoBehaviour {

    public IntPosition position;
    public int otherInt;
    static int count = 0;

    // Use this for initialization
    void Start () {
        position.x = 47;
        otherInt = 10;
    }

    // Update is called once per frame
    void Update () {
        count++;
        if (count < 50)
        {
            Test test = (Test)Instantiate(this);
            Debug.Log((test.position.x == position.x) + " " + (test.otherInt == otherInt));
        }
    }
}

What do I need to make this work?

Try putting [System.Serializable] just before your struct.

Structs cannot be serialized by Unity (which is a massive bummer). Please consider voting for better serialization: http://feedback.unity3d.com/forums/15792-unity/suggestions/1373073-extensible-serialization-system

Try the following instead:

[System.Serializable]
public class IntPosition
{
    public int x;
    public int y;
    public int z;
}

Though you’d probably be better off just naming your fields as follows to avoid extra GC:

public int positionX;
public int positionY;
public int positionZ;