Not directly related to Unity, but does a method stop when a value is returned?
An example, where if there is already an object at the position of an object that is being placed:
bool positionIsAvailible() {
for (int i = 0; i <= positionLog.Length; i++) {
if (positionLog[i] == currentObject.transform.position) {
return false;
}
}
return true;
}