docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BackgroundExtensions

    Extension methods for Background objects.

    Inheritance
    object
    BackgroundExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)