Javascript - sourcing a script without instantiation

Hi

I have an initialization script that is attached to the game camera so as to be executed as soon as the game runs.

I also have a global-vars and util-function script that need to be executed when the game starts. Currently these are also attached to the camera.

The OCD in me says this is not good! I really want a way to source the additional scripts at the start of my init script, so as to only have 1 script attached to a game object in the editor.

Is this possible?

Thanks!

Static variables are available even if the script where they are declared isn’t attached to any object in scene (suppose the same applies to static functions). I think you can add scripts directly with AddComponent, without having to import anything - after compilation all scripts become objects, identified by their class names (the script name without quotes or extension), and are “cloned” and attached to game objects by AddComponent.