OverlapSphere, check how many object with specific tag did it collide with..

Like in the topic. I want to cast a sphere, to check if there is one or more doors around my player character.

Any idea ?

This is from a script of mine, basicly just a modification of the sample script at Unity - Scripting API: Physics.OverlapSphere

    var hitColliders = Physics.OverlapSphere(transform.position, 500.00);
	var resScript : residenceData;
    var numDoors : int = 0;
    for (var i = 0; i < hitColliders.Length; i++) {
    	Debug.Log('City sphere: '+hitColliders*.name);*

if(hitColliders*.tag == ‘door’){*
numDoors += 1;
_ Debug.Log('Door detected '+hitColliders*.name);

if(hitColliders*.tag == ‘residence’){*
_ Debug.Log('City Detected '+hitColliders*.name);
resScript = hitColliders.GetComponent(residenceData);
thisCity.population += resScript.population;

Debug.Log('Amount of doors '+numDoors.ToString());_


Hi, I am able to get the name of the objects which are there in the collider radius but wants to get the data of the objects which are there in the collider radius. for ex. every object has it’s serial number and data. How I can get those things.