Box collider created in script gets wrong position

Hello

I have an empty game object, and at run time (awake) I create a box collider dynamically:

	var c = transform.gameObject.AddComponent(BoxCollider) as BoxCollider;
	c.center = Vector3.zero;
	c.size = transform.localScale;
	c.isTrigger = true;

But when playing, the box collider is not centered in the empty game object.
Any hint what is going on?

Best,
Alberto

Always great to submit a question and find the solution right away.
The collider is automatically scalled with the transform scale.
So, my c.size should be Vector.one:

c.size = Vector.one;

Sorry for the noise. Nevertheless, it might help others.

Thanks