Avoid "new" Monobehavior with constructor of List<class>

For how to post code nicely on the forums: Using code tags properly

Are you sure you want a recipes list inside the class?

If you don’t need game objects, don’t inherit from monobehaviour. If you do want to keep it as a mono behaviour, you use ‘AddComponent’ on the current (or some other) game object.
Another option to a plain C# class is a scriptable object.

Hope that helps some.

1 Like