Can I have multiple components of the same type on my gameObject?

I want to have multiple copies of the same behaviour on one of my gameobjects - each with different values for its properties. Unfortunately, the only API I see for accessing a component gets the component by type. Is there a way to put multiple copies of a component on a single gameObject? If not, what workarounds have people used? I suppose I can add child gameObjects and put one behaviour on each of them. That's very hacky, though, and would require that the behaviour know that it was on a child gameObject of what it's really supposed to control.

You can have multiple AudioSources, and multiple scripts of the same type, on a single game object, but not any other component types. You can access them by using GetComponents().

Can't you use `function GetComponents (type : Type) : Component[]`? You can have multiple copies of one script on an object!

you can attach multiple copies of one component and access them with GetComponents. for javascript sample see the docs. in C# you can get the type of typeof(yourscriptname). it's not that hard. it's better to use arrays for properties or even use lists if the only feature that you want is multiple properties.