Can I create tiny script that only exist in a scene just like in Game Maker?

So in Game Maker, there is a way to create something like a “scene script”, which is a script only attached to an specific object in a scene. This script do not need to be created and preserved in content folder.

Which is very useful for story games, because in this type of game I have to write tons of tiny piece of scripts for many tiny events and interactions happen along the story. It would be very hard to manage them in the content folder. Simply naming those codes gives me headache.

Is there a way to solve this?

Thanks a lot!

You can create one script with a header called a Scriptable object. This is essentially a miniature object-like script that only exists once in your content folder, but can have many different instances/forms of itself on other objects in your scene. I would recommend looking at the Unity Documentation for scriptable objects to get a better understanding of what I mean. @carrotcool