you need to make sureIt looks like the gameobjectoverlapping is causing your issue since the collider will be already colliding with the window that. You can solve this problem a couple ways. you instantiate also hascan create a collidernew layer and you will call your OnMouseDown() fromset the window scriptobject to that layer. then in physics 2d settings you can set the collision matrix to not collide with each other. Or you can possibly set the windows z position to be in a spot that wont collide.