I am also having the same problem. I've reached a kind of trick to get properties from a ScriptableObject, but not using FindPropertyRelative, wich does not work for ScriptableObject but works well for plain objects.
Also using MonoBehaviour will not work if you plan to instantiate the class in another MonoBehavior class, as MonoBehavior classes can only be added as components to GameObject(s). You cannot create it using new, or Unity will complain.
I have to tell you, that yet I don't think my solution is really valid because I am not sure if it works well on prefabs, but that could be maybe because I am trying to save some scene references on the prefab and that seems that cannot be done in Unity.
Well. Stop speech. That is what I do:
Supposing your ScriptabeObject you want to access is of class MySOClass.
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label) {
// Make a new serialized object for your property that is a class that inherits
// from ScriptableObject
SerializedObject serializedObject = new SerializedObject(prop.objectReferenceValue as MySOClass);
SerializedProperty propSP = serializedObject.FindProperty("prop");
if (propSP != null) {
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(propSP , true);
if (EditorGUI.EndChangeCheck()) {
serializedObject.ApplyModifiedProperties();
}
}
}
The fact that I test nulliness of propSP , is because if the actual value of prop is null, Serialized property returned will be also null.