Stupid question...

I think I’m crazy…everything seems ok.Please chacke this out:
I have created a simple script that plus 10 to a scroe when something colide to the object.That’s the code:

var score:int;

function OnCollisionEnter () {
score+=10;
}

function Update()
{
Debug.Log(score);
}

But when it colides nothing happens:(
The object I’ve tried to test this code is a cube with a box collider.Where is the problem?

do you have a rigidbody attached to at least one of the colliders?
put a print statement in the OnCollisionEnter() function.

Yes all the objects have a rigidbody,I put print and the same thing happens…

so does it print? Is the collision registered?
You may also check the the layer collision matrix from edit > project > physics

It’s printing 0,In the layer collision all options are marked but the same thing is happen or best nothing’s happen:(