How (un)usual is it to create classes that are not scripts?

Hello, i come from an XNA background, and all the tutorial i have seen so far, are tutorials that only create classes as scripts

In XNA, i usually create many classes that encapsulate eachother and make use of composition. But it seems like that in Unity, you never do that? Or do you?

So if i wanted to create a class which is not a script/component, is the only way to do that is to create it as a nested class in a script?

Unity allows full use of C# – multiple classes in a regular file, nested (possibly public) classes. You should use all that stuff in the obvious places.

If you want to use the built-in collision call-backs, or mouseOver (not as flexible as raycasting, but easier,) … than you have to subclass from Monobehavior and be in a script all by yourself. Nested classes inside that are allowed. But, lots of what would have been small classes, holding data for markers or something; they instead tend to be put on gameObjects (which means they need to be defined in their own “script(*).”) Unity coders get in the habit of making everything a script.

Then, many Unity coders are self-taught. They aren’t comfortable with inheritance, or using new on a class they wrote (why not just Instantiate a game object with that script on it?) Cut&Paste is easier than composition. So code examples tend to be bare-bones workable.

(*)“Script” has no technical meaning. It’s merely been found to induce less terror than “small program.”