Variables Missing From Inspector?

The Note ScriptableObject has a custom editor. This script will need to be edited if you add variables to the note SO. For example, if you add a variable visible in the inspector, they won't display unless you add those to the custom editor.

Steps to make the variable visible in the inspector with the custom editor:

  • Add the SerializedProperty to the top of the script

SerializedProperty _isReadable;
  • Then in the "OnEnable()" method add the line:

_isReadable = serializedObject.FindProperty(nameof(_isReadable));
  • Then place the correct reference in the "OnGUIInspector()" method as below:

EditorGUILayout.PropertyField(_isReadable);

Last updated