Why can't I use a custom class as an attribute?

Hello, I’ve been making this game where enemies are spawned randomly, the main problem is that, in my game, the enemies spawn when the SpawnManager class makes them spawn. Everything used to work well, until I realized I needed to make a Wave class, since I had been using an int for this, but now I need it to have more methods and more attributes. It would work if I add more attributes to my SpawnManager class, but it wouldn’t be right

so the code is this:

public class SpawnManager : MonoBehaviour {
		
	public int id = 1;
	public float interval; 
	public bool isSpawning;
	public Wave wave = new Wave();
	
	//and more attributes and methods

and currently, my Wave class is this:

public class Wave{
	
	public int currentQuant;
	public int destinyQuant;
  	public int number;	
	
	public Wave() {
		this.currentQuant = 0;
		this.destinyQuant = 0;
		this.number = 0;
		
	}
	
}

As I said, I could just add the Wave attributes in my SpawnManager class, but it would not be right
Please help?

Note that Wave does not inherit from MonoBehaviour, I figured I’d have access to the constructor like this? I have been doing some research and I think maybe Wave should inherit from ScriptableObject ? I can’t fully understand how to use ScriptableObject, or if it’s the right thing to do.

I keep getting the error that “Wave.Wave() is not accessible due to its protection level”, but that does not even make sense, since Wave() is public

Thanks very much for your help :smile:

I dont see anythink that schould’t work. Can you please post all your code