How to find one object in specific layer?

For my game work, I need to separate the objects with the same tag and check of both are the same.
How to find one object in specific layer?

Post a shot with scene Hierarchy please.

You shouldn’t use FIND function. One valid procedure is:

On Start() of these objects, they call a method REGISTER(object) on another class (controller).
objects are added to a list or dictionary.
On Destroy you can DEREGISTER

When you need to check object proprieties, use the list. If you need to filter by layer, you may use a dictionary

By the way, using unity tools, you can use GameObject.FindGameObjectsWithTag

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    public GameObject respawnPrefab;
    GameObject[] respawns;
    void Start() {
            respawns = GameObject.FindGameObjectsWithTag("Respawn");
        
        foreach (GameObject respawn in respawns) {
            if(respawn.layer == 0)
            Instantiate(respawnPrefab, respawn.transform.position, respawn.transform.rotation) as GameObject;
        }
    }
}