I have a box with a hole in it. Is it posible to add a collider only to the dark blue showed at the img? (But only at the borders, not a box collider. Let's say i want some object to get in the box, but cannot touch the blue bars). And how to?
Yes you can.
First make a plane of shape of the blue border which you want.
Add collider to it.
Now create a box and place it to the plane so close that both plane and box look like one single object. Don't add any sort of collider to object.
Save it as a prefab. So that you can use it later as well.
Note: Make the plane and the box object in an empty game object.