public class BaseClass : MonoBehaviour {
public Enum baseVariable;
}
public class DerivedClass : BaseClass {
public Enum derivedVariable;
}
derivedVariable is visible in the inspector, but baseVariable is not. How do I make it visible?
Edit: It actually works fine with ints. I was just trying to simplify my code for the question. In my actual code, I use Enums, and I’m guessing it can’t display the Enums because they are declared in the derived class.
Your code works, just with an error: MonoBehaviour, not MonoBehavior.
Variables don’t show up correctly in editor until the code compiles without any errors. Eliminate errors and all public variables will show up, no matter how many levels of inheritance.