Search Unity

GUITexts on Two Cameras

Discussion in 'Editor & General Support' started by marty, Aug 31, 2006.

  1. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    If I make a split-screen, using the Normalized Viewport Rect settings, then attach a GUIText object to each one, they do not both appear.

    Is there a special process to getting GUITexts to appear on two different cameras that share the same viewport?
     
  2. Sync1B

    Sync1B

    Joined:
    Sep 13, 2005
    Posts:
    561
    Can you duplicate a gui text and position it for each camera?

    Bill
     
  3. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    I'm beginning to think that maybe you can only have one GUIText. Is that the case? And if so, how does one manage having different GUIText's being displayed on each split screen.
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You use layers and the culling mask in the camera to display gui text only on one camera.
     
  5. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Right, but what if I have a split-screen configuration and want different GUIText on each "screen"?
     
  6. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Make a layer called, camera0 and camera1.

    You create two gui texts. One gui text is in layer camera0, the other is in camera1.

    In the first splitscreen camera, set culling mask to exclude camera1.
    In the second splitscreen camera, set culling mask to exclude camera0.


    The important part to remember is that the position for gui texts is relative to the camera. So no need to come up with weird positions outside the screen. Just use layers to exclude gui text from rendering in the other camera.
     
  7. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Cool! I'll try this. Thanks, Joe!

    BTW, any chance you could address my post from yesterday on how you set Unity up to read input from two joysticks or two sets of keys (i.e. for two-player play)?
     
  8. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
  9. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    On a slower system (i.e. G4, Mini), I'm guessing Joe's script that grabs a series of frames is best. Get the frame at about 20fps then stitch them together in QT Pro.

    For what it's worth, from my brief experimentation, any Intel Mac can get beautiful 30fps video with the latest version of Snapz Pro. It's really pretty amazing.
     
  10. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You just have to create multiple input axes in the input inspector.
    Easiest is to just duplicate existing entries, then modifying the accessor name and keys/joystick bindings.
     
  11. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    How about a render to movie?
     
  12. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    Why not lower the time-scale and save by frame?
     
  13. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Fizzelig...
     
  14. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    actually there is a value for specifying exact playback speed measured in frames per second for exactly this purpose and it is what the screenshotting script does, so you never miss a frame.
     
  15. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Nevermind, I figured out what I was doing wrong finally.

    I had deleted the GUILayer object from my cameras. The lesson: don't do that if you want to see GUI stuff on that camera! :p

    Thanks to Joe, et al, for enduring my silliness.
     
  16. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    @Joachim
    May i ask where i find this script and how to use it so that i do get a source material which i can export from quicktime pro as a h.264 afterwards?
     
  17. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
  18. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Thanks Aras!
     
  19. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292