Current core UI

The score board will be a canvas child of ThrowingGame:

  1. With ThrowingGame selected in the Hierarchy, create a new UI | Canvas, named GameCanvas.
  2. Set its Render Mode to World Space.
  3. For its Rect Transform, set Scale to (0.015, 0.015, 0.015).
  4. And Anchors: Min (0,5, 0.5), Max (0.5, 0.5) and Pivot (0.5, 0.5).
  5. Then Position (-1, 2.5, 1), Width/Height: (100, 100).
  6. Set the Canvas Scaler Dynamic Pixels Per Unit to 4, to give the text some higher resolution.

The Canvas gets a child Panel, which in turn gets child Text elements:

  1. Add a child of GameCanvas, create a UI | Panel, named ScorePanel.
  2. Set its Rect Transform Left: -40, and Right: 40.
  3. If you've installed the BallGame assets pack, set its Source Image to Circle (doughnut-icon | Circle).
  4. And Color to Syracuse orange (#D64816FF).
  5. Add a UI Outline component (Add Component | UI | Effects | Outline).
  6. Set its Effect Color to white (#FFFFFFFF).
  7. Set the Effect Distance to X=2, Y=-2 (border width).

Now, add the text elements for the score title and value:

  1. Add a child of ScorePanel and create a UI | Text, named ScoreTitle.
  2. Set its Anchor Presets to Stretch-Stretch (anchor-icon in upper left) to center it, and also Alt+click Stretch-Stretch to set its position (0, 0).
  3. Scale: (0.75, 0.75, 0.75).
  4. Use Font Style: Bold, Font Size: 16, Alignment: middle/top, and Color: #FFFFFFFF (white).
  5. Set its Text to Score.
  6. Duplicate the ScoreTitle and rename it ScoreValue.
  7. Change Font Size: 35, and Alignment: middle/center.
  8. Set its Text to 0.

The resulting score Canvas now looks like this:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset