Using different custom inspectorscripts

Hi,

i have 2 differnt inspector scripts.
1st is a property drawer to draw my own serialized class.
2nd is a custom editor.

When i use DrawDefaultInspector (); in the customeditor i get some errors in the console.
But i need to do it to see the property drawer i made and all other bool vars including a label.

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorGUI.BeginProperty (Rect totalPosition, UnityEngine.GUIContent label, UnityEditor.SerializedProperty property) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:3856)
UnityEditor.EditorGUI.DefaultPropertyField (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:4343)
UnityEditor.PropertyHandler.OnGUI (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:144)
UnityEditor.EditorGUI.PropertyFieldInternal (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:4338)
UnityEditor.EditorGUI.PropertyField (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/EditorGUIBindings.cs:711)
UnityEditor.EditorGUI.PropertyField (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/EditorGUIBindings.cs:706)
ColorSwitcherEditor.OnGUI (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Assets/Color Switcher/Editor/ColorSwitcherEditor.cs:30)
UnityEditor.PropertyDrawer.OnGUISafe (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:23)
UnityEditor.PropertyHandler.OnGUI (Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:134)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:195)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:5989)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:5983)
UnityEditor.Editor.DoDrawDefaultInspector (UnityEditor.SerializedObject obj) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/Editor.cs:317)
UnityEditor.Editor.DoDrawDefaultInspector () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/Editor.cs:327)
UnityEditor.Editor.DrawDefaultInspector () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/EditorBindings.cs:232)
ColorSwitcherEditor2.OnInspectorGUI () (at Assets/Color Switcher/Editor/ColorSwitcherEditor2.cs:23)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/InspectorWindow.cs:1124)
UnityEditor.DockArea:OnGUI()

and

ArgumentException: Getting control 8's position in a group with only 8 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/GUILayoutUtility.cs:513)
UnityEngine.GUILayoutUtility.DoGetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/GUILayoutUtility.cs:306)
UnityEngine.GUILayoutUtility.GetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/GUILayoutUtility.cs:297)
UnityEditor.EditorGUILayout.GetControlRect (Boolean hasLabel, Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:6009)
UnityEditor.EditorGUILayout.FloatField (System.String label, Single value, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/EditorGUI.cs:4929)
ColorSwitcherEditor2.OnInspectorGUI () (at Assets/Color Switcher/Editor/ColorSwitcherEditor2.cs:26)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/InspectorWindow.cs:1124)
UnityEditor.DockArea:OnGUI()

In the Inspector all looks how it should but id like to know whats causing the errors and do i have to get rid of them when selling it on the asset store?

How do i mix them properly?

Hi,

finally i found the solution.

The problem was the PropertyDrawer. So before drawing the propertyfields i need to check it.

if(property.isArray)
		{
			EditorGUI.PropertyField (position, property, false);
		}
		else
		{
		
		EditorGUI.PropertyField (new Rect (position.width - 280, position.y, size*2, position.height),property.FindPropertyRelative ("interval"), new GUIContent("Interval"));
}

Thats it. Cheers