I defined a superclass named LLM and set some of its variables to "[SerializeField]", because I wanted them to be modified in the Inspector window in the scripts of some subclasses. Now I want to create a subclass that inherits from the superclass, but I want some "[SerializeField]" variables in the superclass not to show up in the Inspector window. How can I deal with this problem?
I asked ChatGPT 3.5 to find some resolutions, then I tried this [HideInInspector] protected new string m_Prompt;, but it came out with this error The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(LangChainSpark) m_Prompt
I think you might have to write a custom editor for the child class, and then you can control what is displayed.
https://docs.unity3d.com/Manual/editor-CustomEditors.html