Putting user defined struct in Unity Editor

How can i make to apear public a struct defined by me in Unity Editor?

EDIT: Unity serialization does not support structs. You can create and serialize your own types, but they must be classes, not structs.

Mark your class as serializable and then create a member of that type on a component. Now when you add the component to a game object and select it in the hierarchy, your data will be editable in the inspector.

For example (C#) ...

public class MyComponent : MonoBehaviour
{
    // Declare your serializable data.
    [System.Serializable]
    public class CoffeeMaker
    {
        public float WaterCapacity;
        public float BrewTime;
        public string Manufacturer;
    }

    // Create a component field using your custom type.
    public CoffeeMaker CoffeePot;

    ...
}

i’ve tried this method, and it does give me the ability to assign values in the editor. Or rather… it seems like it does. What actually happens is that it nullifies those values when i start the emulation/script and sets them all to zero. Any suggestions?
using UnityEngine;
using System.Collections;
//using System.Serializable;

public class turbines : MonoBehaviour {

[System.Serializable]
public class turbine{
	public string model;
	public int lifetime;
	public float height;
	public int ratedWind;
	public int cutinWind;
	public int cutoutWind;
}
/*
public struct turbine{
	public string model;
	public int lifetime;
	public float height;
	public int ratedWind;
	public int cutinWind;
	public int cutoutWind;
}*/
public turbine V10018MW;

// Use this for initialization
void Start () {
	V10018MW = new turbine();
	Debug.Log(V10018MW);
}

// Update is called once per frame
void Update () {

}

}

I have been looking for a way to make a true struct (Not a class), and after doing some experimenting found a ‘struct’ keyword, but it did not work the way I expected. I can’t find anything in the Unity scripting guide or even any regular javascript tutorials on it, however. MonoDevelop still shows it in the dropdown list, however, and tints it green like the var keyword. It does not work like the var or enum keywords. I am not sure how to use it, or if it even is supposed to exist, but I felt like sharing this discovery in the hope that it might be useful.

In C# there is a struct keyword, but a good way to make structs is to make a class that inherits from System.Object. In C# you will need to use [System.Serializable]. In JavaScript it does it automatically. If you use something like this:
(I normally use JS so my C# syntax might be a bit off… Sorry!)

#pragma strict
//JavaScript
class MyStruct extends System.Object{
     var MyFloat : float;
     var MyString : String;
}
//C#
class MyStruct{
     public float MyFloat;
     public String MyString;
}

Then you can make variables of type MyStruct, and access the variables MyFloat and MyString.

[System.Serializable]
public struct Stage
{
public float requiredMass;
public Material mat;
}

public Stage stage;

This method works for me, Use [System.Serializable] on declaration of struct instead of the variable.