Hello People of the Unity Forums, i Come to you today with a question you see i was trying to find if there was already a building at the position i was instantiating at but im not quite sure how to do such a thing. I have my code but it is quite broken.
if (GameObject.FindGameObjectsWithTag("Building").Contains(gameObject.transform.position == cursorposint)) {
Instantiate(buildings[selectedbuilding], cursorposint + new Vector3(0, -1, 10), transform.rotation);
print("build");
}
your help on the matter would be great.