/// <summary> /// Enables the user to choose whether or not to activate this processing method. /// </summary> /// <param name="isCompatible"></param> True if the method is compatible with the source data, false otherwise. /// <returns></returns> True if the method is selected (i.e. should execute), false otherwise. public bool SectionShouldExecute(bool isCompatible) { SerializedObject serializedObject = new SerializedObject(this); serializedObject.Update(); SerializedProperty propertyShouldExecute = serializedObject.FindProperty(_propertyNameShouldExecute); GeneralToolkit.EditorWordWrapLeftToggle(GetGUIInfo(), propertyShouldExecute); propertyShouldExecute.boolValue = propertyShouldExecute.boolValue && isCompatible; bool outIsSelected = propertyShouldExecute.boolValue; if (outIsSelected) { DeactivateIncompatibleProcessingMethods(); } serializedObject.ApplyModifiedProperties(); return(outIsSelected); }