- Home /
Make part of the GUI become invisible
I have a stage select on my game, and I want to add arrows that slide them.
Picture this:
<- |[Stage1]| |[Stage2]| |[Stage3]| ->
I want to make it so that when you slide it right:
<- ge1]| |[Stage2]| |[Stage3]| |[S ->
It looks like this, cutting off the left side of the stage 1 button and a portion of the right side appears.
Now I realise this could be easily achieved by putting a texture on a higher layer on the sides like
|LAYER|ge1]| |[Stage2]| |[Stage3]| |[S|LAYER|
And then put the arrows on the layer, however, I want the GUI to be rendered on the actual background of the game, so putting layers on would make me have to make a whole 2D screen, when currently my GUI overlays the 3D background.
So essentially, what I'm asking is, is there a way to either "cut" into the left and right side of the things as they move, or (more ideally) make a transparent GUITexture that tells everything underneath it to be transparent too?
Thanks
Answer by Alexrose12345 · Aug 05, 2012 at 07:15 PM
I just thought:
How about as a solution, using two cameras. Would this be possible in Unity Free? What I'd need is one normal camera with the GUI arrows on it and then a second camera with the stages on it, but that camera would take up less of the screen.
Like
-----------------------------------------------
| | | |
| | Camera2 Span | |
| |<----------------------------->| |
| | | |
| | | |
| <- |AGE1 STAGE2 STAGE4 S| |
| | | |
| | | |
| | Camera1 span | |
|<------------------------------------------->|
-----------------------------------------------
Is this possible in Unity Free?
That would work on free. You might also want to check this out