Contact Detection

Is there a way to determine whether two colliders are touching without letting any frames pass?

As in, I want to procedurally create a few objects, but there’s a risk some of them might be generated within one another. How can I tell, from script, whether that is the case?

My understanding of colliders is that they need time (a frame, at least) to send their collision messages, and that I cannot immediately access collision information from the script that created the colliders (and their gameObjects) in the first place. I might be wrong here, so if someone could confirm or correct this…

Any help is dearly appreciated.

The no way to do what you want perfectly with standard interfaces. You can use Physics.CheckSphere or Physics.OverlapShere(). They check to see if the bounding box of another object is within a specified distance of a point. Using these, it is easy to prevent two object from being inside each other, but these functions do suffer from false positives if objects are very close together.