Version: 2023.1
Language : English
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(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary
. The choice between the two depends on the specific requirements of your application. For more information, refer to Image versus VisualElement.backgroundImage.

Topic Description
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, SpritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
, and Vector images before you use them as a background for a visual elementA node of a visual tree that instantiates or derives from the C# VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More info
See in Glossary
in the UI Builder.
9-Slice images with UI Toolkit Use 9-Slice images to create resizable UI elements.

Additional resources

Relative and absolute positioning
Set background images with an image asset
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961