Hide base class' serialized field in inspector

class a : MonoBehaviour
{
[SerializedField]
private int num = 5;
}

class b : a
{
...
}

How can I hide the num field in the inspector when using the b class?

You could write a custom editor for the derived class. Check this tutorial for more information about building a custom inspector.

You can’t do it