Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Background

Describes a VisualElement background.
Read time 1 minuteLast updated 2 days ago

Definition

public struct Background : IEquatable<Background>

Properties

Property

Description

renderTextureThe RenderTexture to display as a background.
spriteThe sprite to display as a background.
textureThe texture to display as a background.
vectorImageThe VectorImage to display as a background.

Methods

Method

Description

GetSelectedImageRetrieves the selected asset which can be of a type of Texture, Sprite, RenderTexture or VectorImage.
IsEmptyHelp verify whether an asset has been assigned or not.

Static Methods

Method

Description

FromRenderTextureCreates a background from a RenderTexture.
FromSpriteCreates a background from a Sprite.
FromTexture2DCreates a background from a Texture2D.
FromVectorImageCreates a background from a VectorImage.