Check If a certain type of object lies at that location or not

There are bunch of objects in my scene and they all cross a particular point. I want to know how can I check if a particular object lies at that location. Thank you

There are several ways you can accomplish this depending on your exact needs but the first question you need to answer is do you mean at an exact position or approximate position (like within a limited range/distance)?

Here is one way to do this

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ItemLocationManager : MonoBehaviour
{
    // this is the specific position where objects will be checked against
    public Vector3 objectPosition = Vector3.zero;

    // this is how often are the list is checked - do not set this below 1 frame
    [Range(0.0167f, 10f)] 
    public float pollTime = 0.083f; // defaulting to approximately every 5 frames - 1/60 * 5

    // list of objects to search - these need to be set in inspector at design time
    // if you have only one object only put that one in the list
    public List<GameObject> objectList = new List<GameObject>();

	// Use this for initialization
	void Start ()
    {
        if (objectList.Count > 0)
        {
            StartCoroutine(FindObjects());
        }
	}
	
	IEnumerator FindObjects ()
    {
        while (true)
        {
            for (int i = 0; i < objectList.Count; i++)
            {
                if (objectList*.transform.position == objectPosition)*

{
ProcessObject(objectList*);*
}
}
yield return new WaitForSeconds(pollTime);
}
yield return 0;
* }*

* void ProcessObject (GameObject obj)*
{
// process your object here
* }*
}
Or if you have a bunch of objects with the sabe tag that you wand to find you can do this (this method also uses exact position)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ItemLocationManager : MonoBehaviour
{
// oject tag to search for
public string objectTag;

// this is the specific position where objects will be checked against
public Vector3 objectPosition = Vector3.zero;

// this is how often are the list is checked - do not set this below 1 frame
[Range(0.0167f, 10f)]
public float pollTime = 0.083f; // defaulting to approximately every 5 frames - 1/60 * 5

* // Use this for initialization*
* void Start ()*
{
if (objectTag != “”)
{
StartCoroutine(FindObjects());
}
* }*

* IEnumerator FindObjects ()*
{
while (true)
{
// find only objects with a given tag
List objectList = new List(GameObject.FindGameObjectsWithTag(objectTag));
if (objectList.Count > 0)
{
for (int i = 0; i < objectList.Count; i++)
{
if (objectList*.transform.position == objectPosition)*
{
ProcessObject(objectList*);*
}
}
}
yield return new WaitForSeconds(pollTime);
}
yield return 0;
* }*

* void ProcessObject (GameObject obj)*
{
// process your object here
* }*
}
Now if you want to find the object(s) within a given distance
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ItemLocationManager : MonoBehaviour
{
// this is the specific position where objects will be checked against
public Vector3 objectPosition = Vector3.zero;

// this is how often are the list is checked - do not set this below 1 frame
[Range(0.0167f, 10f)]
public float pollTime = 0.083f; // defaulting to approximately every 5 frames - 1/60 * 5

// this is the distance to checkfor in
[Range(0.0f, 30f)]
public float distance = 0.0f;

// list of objects to search - these need to be set in inspector at design time
// if you have only one object only put that one in the list
public List objectList = new List();

* // Use this for initialization*
* void Start ()*
{
if (objectList.Count > 0)
{
StartCoroutine(FindObjects());
}
* }*

* IEnumerator FindObjects ()*
{
while (true)
{
for (int i = 0; i < objectList.Count; i++)
{
if (ValidMinimumDistance(objectList*.transform.position))*
{
ProcessObject(objectList*);*
}
}
yield return new WaitForSeconds(pollTime);
}
yield return 0;
* }*

bool ValidMinimumDistance(Vector3 pos)
{
bool isValid = true;
float minDistance = Mathf.Abs(distance);

isValid = (Mathf.Abs(Vector3.Distance(objectPosition, pos)) >= minDistance);
return isValid;
}

* void ProcessObject (GameObject obj)*
{
// process your object here
* }*
}
Or if you want to find the object(s) within a given distance using a specific tag
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ItemLocationManager : MonoBehaviour
{
// oject tag to search for
public string objectTag;

// this is the specific position where objects will be checked against
public Vector3 objectPosition = Vector3.zero;

// this is how often are the list is checked - do not set this below 1 frame
[Range(0.0167f, 10f)]
public float pollTime = 0.083f; // defaulting to approximately every 5 frames - 1/60 * 5

// this is the distance to checkfor in
[Range(0.0f, 30f)]
public float distance = 0.0f;

* // Use this for initialization*
* void Start ()*
{
if (objectTag != “”)
{
StartCoroutine(FindObjects());
}
* }*

* IEnumerator FindObjects ()*
{
while (true)
{
// find only objects with a given tag
List objectList = new List(GameObject.FindGameObjectsWithTag(objectTag));
if (objectList.Count > 0)
{
for (int i = 0; i < objectList.Count; i++)
{
if (ValidMinimumDistance(objectList*.transform.position))*
{
ProcessObject(objectList*);*
}
}
}
yield return new WaitForSeconds(pollTime);
}
yield return 0;
* }*

bool ValidMinimumDistance(Vector3 pos)
{
bool isValid = true;
float minDistance = Mathf.Abs(distance);

isValid = (Mathf.Abs(Vector3.Distance(objectPosition, pos)) >= minDistance);
return isValid;
}

* void ProcessObject (GameObject obj)*
{
// process your object here
* }*
}
These are just a few ways to do what you asked. Of course everything depends on what your exact needs are.