Where to store a bunch of pre-set variables and constants? (noob question)

Hi,

  1. I've got about 103 gazillion initialized variables, hashes, arrays and constants along with descriptive notes at the top of my "main" script. Is there something akin to a .h file I can put these away in?

  2. If I put them in a separate script, do I need to then attach them to a gameObject?

  3. If I put them into a separate script, will I have to

    GetComponent("storageScript").somevariable

103 gazillion times from my actual functions script?

Thanks for any info.

EDIT:

Oops. Not answered. The suggested solution requires re-declaring variables in the main script anyway. Now I'm just duplicating all those variables.

You could do this:

//StorageScript.js

class MainVariables
{
   var somethingOrOther : int;
}

Save that in your standard assets, then when you need to access it:

//OtherScript.js

var variables = new MainVariables;
var someVariable : int;

Update
{
   someVariable = variables.somethingOrOther;
}