UnityGUI in front of gameobjects

Hey guys,

I have a game where balls fall down and the player is supposed to mouseclick them.

At the same time I have set up a onGUI in front of the screen that is cut off in the middle via alpha channel as shown on the diagram like a viewscreen.

Problem with this approach is that the onGUI will block the ball from being clicked on.

Is there any way to get around this?

Thx!

I’m afraid not. You really want to stretch the content right up to the edges of the image. What causes problems is that it’s best for textures to have a dimension that’s a power of two on each edge. You can make the image it’s final size, then in the import settings have it automatically scaled up or down to the nearest power of two. The stretching might get ugly, though.

If you want to make a frame or border you just have to make an image for each edge so you can still register clicks in the middle.