Displaying the art info
Now that we have more information on each art piece, we can incorporate that into our project. We will add a UI canvas to the ArtworkRig. First, we'll include an info plaque with each picture. Then we'll make it interactive. If you'd like a reminder introduction to Unity's canvas and UI elements, please look at Chapter 6, World Space UI.
Creating the title plaque
The title plaque will be a small canvas next to each picture, with a title text UI element:
- Select one of the
ArtworkRig
objects inHierarchy.
- Add a child canvas,
Create UI
|Canvas
, named InfoPlaque. - Set its
Render Mode
toWorld Space.
- Initially reset its position
Pos
to (0
,0
,0
). - Set the canvas
Width
:640
,Height
:480
. - If you recall, the canvas scaled in world space will be 640 meters wide! Set the
Scale
to0.0006.
- Now you can visually adjust the position using the move gizmo, we found this works:
Pos
(0.8
,-0.1
,-0.01
). - Next, create a child pane,
Create UI
|Panel
. - And a sub-child of the panel, create a child text...