Classes that are not inheriting from Monobehaviours cannot be attached to a Gameobject as a component. Why is it? What is Monobehaviour exactly?
MonoBehaviour inherits from the
Behaviour class which inherits from the
Componentclass to extend its functionalities.
It is the base class for everything that can be attached to a GameObject.
It implements component related stuff such as
A component that can be enabled or disabled, it does not implement anything else.
It is the base class for every scripts. It implements some basic method, such as Invoke and Coroutine handlers. It also implements all the messages (event methods) Unity calls internally.
You can create a class which inherit from
Component, but it won’t receive
Update, and such messages and you won’t be able to enable/disable it. By inheriting from
Behaviour, you can enable/disable your component, yet it does not have much effect since this is mostly useful for the event methods. It is very uncommon to inherit directly from these classes but you can do it if you need an object which just need to use GetComponent and such methods.