Referencing a GUISkin in EditorGUI script from another script (C#)

I’m trying to make a custom editor for my inventory script. And in this script I have custom GUISkins for it. How do I call GUISkin with EditorGUILayout? Here’s what I’ve tried.

using UnityEditor;

using UnityEngine;
using System.Collections;


public class EditorInventory : Editor
public override void OnInspectorGUI()
InventoryController InvController = (InventoryController)target;
GUILayout.Label(“Base Settings”, EditorStyles.boldLabel);

    GUILayout.Label("Main GUI Skin");
    InvController.mainSkin = EditorGUILayout.ObjectField(InvController.mainSkin, GUISkin);

    GUILayout.Label("Inventory Length");
    InvController.InventoryXSize = EditorGUILayout.IntSlider(InvController.InventoryXSize,1,8);

    GUILayout.Label("Inventory Height");
    InvController.InventoryYSize = EditorGUILayout.IntSlider(InvController.InventoryYSize,0,8);


And yes I tried the scripting reference help menu with no luck.

I verified that the following code works:

InvController.mainSkin = (GUISkin)EditorGUILayout.ObjectField("Main GUI Skin", InvController.mainSkin, typeof(GUISkin));

Also note, that if you are changing a filed like this, it will not be saved when you run the scene. To tell Unity to save changes made in editor mode, add the following at the end of your OnInspectorGUI() function:

// Save to disk on change
if (GUI.changed)

Really people? no one can help me?