I’m having an issue with my 2D game’s code…
Collider2D[] colliders = Physics2D.OverlapCircleAll(wallspawn.transform.position, 1f, 0);
if (colliders.Length == 0)
{
CmdWallSpawner();
}
else
{
Debug.Log(colliders);
}
This should see if there are any objects on the default layer, where I put my building blocks, and other collidable objects… but It still allows me to place an run the CmdWallSpawner() function even if there is something in that area…