How to check if an object is colliding with another from another script ?

I would want to know if it is possible to know if an object is colliding with another from at a specific frame, doing something like that :

obj1.isCollidingWith(obj2);

I would want to do this without attaching a script to obj1 nor obj2, because I don’t know which objects I want to check together.

Doesn’t work that way, I’m afraid. See this thread.

You could write a very generic OnCollisionEnter() that populates a data table. You can attach scripts from code using AddComponent(). At the end of the day, though, you need to attach some script to catch those collision events.