Variables Missing From Inspector?
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
Was this helpful?