EditorGUILayout.ObjectField select custom type derived from ScriptableObject

how to select a custom class type instance form the scene with ObjectField.

i have a class KeyItem witch derives from Item witch derives from scriptable Object. all fields are serialized and the class itself is also serializable.

this is my EditorGUI line:

keyItem =EditorGUILayout.ObjectField(keyItem,typeof(KeyItem),true)as KeyItem;

and so how can i see the keyItems that reside in the scene view.
keyItems get created with a custom editor window, they have a field for a prefab as graphical presentation of the KeyItem and on that prefab is a script “collectItem” derived from monobehaviour that holds my instance of the KeyItem . It’s that instance i want to be able to select in the ObjectField search window.

i could set the ObjectField to the script collectItem qnd then check if the Item is a KeyItem, but surely there has to be a way to do this directly.

thx
J.

this did the trick

case ItemType.keyItem:
						if(GUILayout.Button("Create Item", GUILayout.Width(150)))
						{
							KeyItem keyItem=(KeyItem)ScriptableObject.CreateInstance<KeyItem>();
							keyItem.ItemName=itemName;
							keyItem.Description=description;
							keyItem.ThisItem=itemObj;
							itemManager.itemList.Add(keyItem);
							index = itemManager.itemList.IndexOf(keyItem );
//creating this prefab of the instance solved it for me.
							AssetDatabase.CreateAsset(keyItem, "Assets/Items/"+index+"_"+keyItem.ItemName+"_keyItem.prefab");
							Create(index);
						}
					break;