Class BackgroundExtensions
Extension methods for Background objects.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public static class BackgroundExtensions
Methods
FromObject(Object)
Creates a new Background from a Unity image asset.
Declaration
public static Background FromObject(Object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The image asset to create the background from. |
Returns
Type | Description |
---|---|
Background | The created background. |
Remarks
The image asset can be a Texture2D, Sprite, RenderTexture or VectorImage.
GetSelectedImage(Background)
Gets the selected image from the background.
Declaration
public static Object GetSelectedImage(this Background bg)
Parameters
Type | Name | Description |
---|---|---|
Background | bg | The background to get the image from. |
Returns
Type | Description |
---|---|
Object | The selected image. |