Using and Creating UI Prefabs
Using and Creating UI Prefabs
This system has been deprecated and will be removed in a future release. |
In the UI Editor, prefabs are preconfigured UI elements and compound elements that you can add to a canvas. You can also create custom prefabs.
To add a prefab element
In the UI Editor toolbar, click New, Element from prefab.
Select from:
- Button
- Checkbox
- Image
- LayoutColumn
- LayoutGrid
- LayoutRow
- ScrollBox
- ScrollBarHorizontal
- ScrollBarVertical
- Slider
- Text
- TextInput
The new element appears in the Hierarchy pane and viewport.
If you have created your own element or modified an existing prefab, you can save it as a custom prefab.
To save a custom prefab element
In the UI Editor, right-click an element that you have created or modified in the Hierarchy pane or viewport.
Click (Deprecated) Save as Prefab.
In the Save As dialog box, do the following:
Navigate to any location in the project folder where you want to save your prefab.
Name your prefab with a
.uiprefab
file extension.Click Save.
Your prefab now appears in the New, (Deprecated) Element from prefab menu.