- Home /
Splitscreen w/ different GUIs on each camera
Hey, I'm trying to do a splitscreen deathmatch kind of game, and I'd like each player to have a health bar and some other HUD Gui textures on each camera, but obviously I'd like each one to be specific to that player's camera. Any way I can do that?
Answer by nowhereman · Jul 16, 2011 at 08:47 PM
Figured it out. The answer was in putting the GUIs on different layers and changing each camera's Culling mask so it only saw its respective layer
hey bro, I was wandering if you could make a simple tutorial on how to do that.
Hi, friends! I've just published a full study (like a tutorial) in my blog using this technique. This post is credited there. Thanks! http://fredzvtgamedev.com/2014/07/full-study-split-screen-with-pause/
Answer by DaveA · Jul 14, 2011 at 04:19 PM
You could make one script containing OnGUI which has an 'offset' variable, attach to each camera. Offset for one on the left maybe 0 and the the one on the right Screen.width/2 (or something like that)
I haven't tried using an OnGUI script yet, but I'm not so sure if it would work, I would think it would end up putting both GUIs on both cameras, one at each camera's 0 offset and one at each camera's Screen.width/2. I'll have to try it out though....
Your answer
Follow this Question
Related Questions
How do you hide the Network HUD GUI? 1 Answer
How to make a texture cover an entire GUI box 0 Answers
Can't get Gui Pos on top of Enemy ingame! 0 Answers
Resolution for assets on Android 1 Answer