How do I proceed while facing this closed issue?

I am seeing a bug where a custom class property with the HideInInspector attribute cannot be drawn with the EditorGUILayout.PropertyField method.

I found a closed issue describing the same issue but I am still seeing it on 2022.1.20f1.

Here is the issue: Unity Issue Tracker - Drawing serialized properties with HideInInspector attribute only works for some variable types

How should I proceed? I’ve never really used the issue tracker or the forums before so I’m not sure what the best course of action is. I’ve left a comment on the issue but I’m not sure if it will get seen by the right people or if I need to do more.

Is it actually a property, in the C# sense? Or is it a field?

It’s a field.

The custom editor will draw the label but none of the members of the class.
If I remove the HideInInspector attribute the serialized class is drawn correctly in the inspector, but I need to hide the property so that when I call base.OnInspectorGUI to draw all the other properties, the properties I am trying to detect changes on are not drawn twice.

I’ve got a workaround where I just get all the relative properties of my custom class and draw a property field for each one but this is not ideal because if I add/remove members of the class I will need to update the custom editor.

I could also make my custom class a ScriptableObject to make it work but I don’t want changes on one gameobject to affect others and I don’t want to have to create a new SO every time I create a new prefab.

Maybe easier if I post this code. The following code fails to draw the property field for “_classB”; just the label is drawn.

public class ClassB
{
    public float FloatB;
}

public class ClassA : MonoBehaviour
{
    // I hide this field so that I can draw it myself and detect any changes.
    [SerializeField, HideInInspector]
    private ClassB _classB;
    [SerializeField]
    private float _floatA;

    public void OnClassBChanged()
    {
        // Do a thing
    }
}

[CustomEditor(typeof(ClassA))]
public class ClassAEditor : Editor
{
    private ClassA _classA;
   
    private void OnEnable()
    {
        _classA = (ClassA)target;
    }

    public override void OnInspectorGUI()
    {
        // I want to draw the base inspector so that _floatA and any other fields added in future are drawn in the inspector.
        base.OnInspectorGUI();
        using (var check = new EditorGUI.ChangeCheckScope())
        {
            // Then I draw the ClassB field within a change check so that I can detect changes.
            SerializedProperty property = serializedObject.FindProperty("_classB");
            EditorGUILayout.PropertyField(property);

            if (check.changed)
            {
                _classA.OnClassBChanged();
            }
        }
    }
}

I’m not really sure the intricacies of this but it’s kind of a solved problem and I would just reach for an off-the-shelf solution. If you’re looking for OnChange notifications there are existing solutions to that like NaughtyAttributes:
https://dbrizov.github.io/na-docs/attributes/meta_attributes/on_value_changed.html

Odin serializer can also do this but it is not free.

I’m much more interesting in learning how to make it work rather than just making it work and moving on so I’ll probably have a look at how NaughtyAttributes gets it done and implement a solution that does what I need, thanks for the tip.

I would also like to know what the best procedure is for reporting this issue. If anyone is able to say so, is my comment on the issue tracker sufficient? Or should I submit a new issue? If so, where?