void OnEnable() { if (editorToolsObject == null || findTextProp == null) { editorToolsObject = ScriptableObject.CreateInstance<EditorToolsObject>(); SerializedObject serializedObj = new SerializedObject(editorToolsObject); exampleProperty = serializedObj.FindProperty("exampleProperty"); findTextProp = serializedObj.FindProperty("findTextProp"); componentNameProp = serializedObj.FindProperty("componentName"); //resultObjectsProp = serializedObj.FindProperty("resultObjectsProp"); } }