I tried the following function. But, its not working.
void GameLogic()
{
GameObject one = GameObject.FindGameObjectWithTag(“One”);
GameObject two = GameObject.FindGameObjectWithTag(“Two”);
if (one.transform.position.x == two.transform.position.x)
{
Debug.Log("inline");
}
}
Here, gameobjects are clones of the original.