Version: 2023.2
Relative and absolute positioning
Set background images with an image asset

Set background images

You can use both the Image element and the VisualElement.backgroundImage property to add visual content to your UI. The choice between the two depends on the specific requirements of your application. For more information, refer to Image versus VisualElement.backgroundImage.

Topic 描述
Set background images with an image asset Use an imported or built-in image asset to set a background image for your UI.
Image import settings Apply import settings for Textures, Sprites, and Vector images before you use them as a background for a visual element in the UI Builder.
9-Slice images with UI Toolkit Use 9-Slice images to create resizable UI elements.

其他资源

Relative and absolute positioning
Set background images with an image asset