A Unity prefab can contain the UI objects in a main menu. Accessing its buttons raises practical concerns about editor assignments, collaboration, and references that break when variables are renamed. section 8.2.1
Common ways to access menu buttons have trade-offs:
- Finding an object by name with GameObject.Find() is slow and can fail if the object is renamed. section 8.2.1
- Assigning public variables in the editor requires repeated prefab handoffs and exposes the prefab to more of the codebase. section 8.2.1
Figure 8.6 The main menu prefab, including the UI objects we need to access using code.

The figure shows the main menu prefab and the UI objects code needs to access. section 8.2.1
