Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Best Scoring Method

Discussion in 'Editor & General Support' started by elias723, May 23, 2006.

  1. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    Hey Unity folks. I was wondering what the generally accepted way of displaying scores is. There are a couple things I thought of, including an object in the scene, and the game controller itself.
    I'm also having trouble with displaying text on only some of the cameras some of the time. I want the cameras to be able to show a life number and a target sign while the players are alive, and when they die, show the score. My main problem is getting individual cameras to do different things.

    Any ideas?
     
  2. Mike08

    Mike08

    Joined:
    Dec 29, 2005
    Posts:
    124
    Try to use Layers:

    How to do this is explained here.

    I hope this will help you.

    By
     
  3. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    Layers are more appropriate for drawing objects in different groups, according to how you want them to be drawn on the screen. They're most useful for 3D game objects.

    I would recommend using a GUIText or TextMesh, depending on how you want to integrate the score into the look of the game.
     
  4. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    Thanks - that helps a lot, but I have a new problem - I changed the layer on the scoring GUIText, but when I press play, it switches it and another object (layer = default) to another layer that's being drawn. Clearly, this is aggravating, and I can't get it to get better.
    Also, I can't figure out what the logic is behind changing the cullingMask on the camera. Perhaps it is another bug-like problem, but I can only get it to change between Default and Nothing (respectively responding to an odd and an even number that the cullingMask is set to).
     
  5. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    Nobody knows what could be causing this? I'm sure somebody does. Thanks for any help!
     
  6. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Maybe you can post a couple of screenshots of inspector so we know more about what you are doing?
     
  7. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    Sure.
    Picture 1: GUIText object named Scores : notice Layer = Scores
    Picture 2: Main camera : notice that Scores is invisible
    Picture 3: Scores again : notice changed layer - now it is visible (without being changed through a script or the inspector - the only difference is that now the scene is playing)

    Any idea what the problem is?