How to access a system.type vairable from inspector

Hi im trying to setup a system where I can tell if an object in a list is the one I want via a stored type e.g.

public system.type Type

however I require the ability to set this type via the editor and not via script. The inspector doest display system.type [didnt think it would] so i require some other type that i can get the type i need from [little confusing] basicly i want to do this

public Script script;
subobject.type = typeof(script)

that way I can check through them like this

    foreach(subobject c in ListOfSubobjects)
        if(c.type == typeof(ThingICareAbout))
            GUI.Button(new Rect(5,30+30*i,100,25),;

Now my problem is I don't know what I should use instead of the "public Script script" to be allowed to drop a script file into the inspector for that variable or if its even possable.

You could use a string variable in the inspector and then parse it to a type when you want it.

System.Type type = System.Reflection.Assembly.GetExecutingAssembly ().GetType (myTypeName);

Otherwise you can also try

if (c.type.Name == myTypeName) {

To avoid that ugly Assembly call. This works almost in the same way, just the other way round.

A script type... Could be MonoBehaviour, could be 'MyScriptName', could be MonoScript, depends on what you want.

Usually you have a variable like

public MyScript script;

Where MyScript is a MonoBehaviour. You can also do

public MonoBehaviour script;

Which is basically the same, except now you can assign any script to the variable. To get the type of the assigned script you can do

Debug.Log ("Script type : "+script.GetType ());