Assuming since I’ve restarted the game with no coins in the walls/objects that my fix is good?
Vector2 GetSpawnPoint()
{
float x = 0;
float y = 0;
while (true)
{
x = Random.Range(xSpawnRange.x, xSpawnRange.y);
y = Random.Range(ySpawnRange.x, ySpawnRange.y);
Vector2 spawnPoint = new Vector2(x,y);
_coinBuffer[0] = Physics2D.OverlapCircle(spawnPoint, _coinRadius);
if(_coinBuffer[0] == null) return spawnPoint;
}
}