Skip to content
Nick Olenz edited this page Aug 13, 2020 · 3 revisions

Create the canvas

  1. Create a new Canvas object in your scene. This will also automatically create an EventSystem object, which needs to be deleted.
  2. Set the canvas' render mode to 'World Space'.
  3. Set the canvas' scale to 0.01 across all axis, then change the Canvas Scaler script's Dynamic Pixels Per Unit value to 5.
  4. You can now position and size the canvas how you want. Because of the scale, a width of 100 in-editor will be equal to 1m in-game.

Creating buttons

  1. In your canvas add a button normally. (Right click > UI > Button)
  2. Position and size it how you want.
  3. Add the 'Pointable Button' component to the button object. This also creates a Box Collider on your button.
    IMPORTANT: The collider is how H3 determines what you're pointing at so it's size must match the size of your button! (X/Y only, leave Z at 1)
  4. In the inspector for the pointable button, assign the references to their matching components. The Button and Image references come from the button object and the Text reference comes from the text object created as a child to the button
  5. Lastly, edit your button as you normally would in Unity.

Everything else

Pretty much everything else is created as it would normally be in Unity.