UCA User Interface Design & Implementation 3 — Questions and Answers
Question 1: When using TextMeshPro, what is the advantage of using a Signed Distance Field (SDF) font atlas over a rasterized bitmap font?
- SDF fonts remain sharp at any scale without aliasing (Correct answer)
- SDF fonts use less GPU memory
- SDF fonts support more color channels
- SDF fonts render faster on mobile
Correct answer: SDF fonts remain sharp at any scale without aliasing
SDF fonts store distance data rather than pixel data, enabling crisp rendering at any resolution or zoom level.
Question 2: Which Unity layout component arranges its children in a single horizontal row and adjusts their positions automatically?
- Horizontal Layout Group (Correct answer)
- Grid Layout Group
- Vertical Layout Group
- Flow Layout Group
Correct answer: Horizontal Layout Group
Horizontal Layout Group arranges child RectTransforms side-by-side along the X axis.
Question 3: What does setting a UI element's RectTransform anchor to the four corners of its parent achieve?
- The element stretches to fill the parent regardless of screen size (Correct answer)
- The element is centered in the parent
- The element is pinned to the top-left corner
- The element maintains a fixed pixel size
Correct answer: The element stretches to fill the parent regardless of screen size
Spreading anchors to all four corners of the parent makes the element scale and stretch with the parent's dimensions.
Question 4: In Unity UI Toolkit, what is a USS file used for?
- Defining visual styles such as colors, fonts, and layout for UI elements (Correct answer)
- Storing UI event callbacks
- Defining the hierarchy of UI elements
- Compiling UI scripts at runtime
Correct answer: Defining visual styles such as colors, fonts, and layout for UI elements
USS (Unity Style Sheets) is UI Toolkit's CSS-like format for applying visual styling to UI elements.
Question 5: Which component on a ScrollRect is responsible for the visible area that masks the scrollable content?
- Mask
- RectMask2D (Correct answer)
- Viewport
- Clipping Plane
Correct answer: RectMask2D
RectMask2D clips content to the rectangular bounds of the viewport, making content outside invisible without using a stencil buffer.
Question 6: What Unity UI component binds a Slider's value to a visible progress bar fill amount?
- A separate Image component with Fill method set to Filled (Correct answer)
- Toggle Group
- Animator Controller
- Canvas Scaler
Correct answer: A separate Image component with Fill method set to Filled
Setting an Image's Image Type to Filled and controlling its Fill Amount via script mimics a progress bar driven by any value.
Question 7: Which Unity class should you inherit from when creating a custom Editor window that uses UI Toolkit?
- EditorWindow (Correct answer)
- MonoBehaviour
- ScriptableObject
- UIDocument
Correct answer: EditorWindow
EditorWindow is the base class for custom tool windows in the Unity Editor, and it supports UI Toolkit via its rootVisualElement.
When using TextMeshPro, what is the advantage of using a Signed Distance Field (SDF) font atlas over a rasterized bitmap font?