Public variables are not showing in the inspector

In the code below, I created a state machine with a few states. I am trying to expose these to assign it in the inspector, but when unity compiles they are not available as an assignable slot?

The funny thing is, I’ve made other variables to test if they compile in unity, AND THEY DO!

What are some of the causes of public entities not showing in the editor?

using Dodgeball_StatePattern;

public class Dodgeball : MonoBehaviour

// State Machine & States
public StateMachine stateMachine;
public IdleState idleState;
public ActiveState activeState;

public float test = 7;
public Transform transformTest;


For your own classes you might have to add [System.Serializable] right before you declare the class.