logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityImage

    Reusable gameplay image widget (portraits, icons, banners). Wraps a UnityEngine.UI.Image on its own GameObject. There is no theme template for raw images, so this is a thin, drop-in widget for any game's gameplay UI. Created via CreateImage(Transform, Sprite).

    Inheritance
    object
    SerenityImage
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Ui.Infrastructure.Widgets
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public sealed class SerenityImage

    Constructors

    SerenityImage(GameObject, Image)

    Declaration
    public SerenityImage(GameObject root, Image image)
    Parameters
    Type Name Description
    GameObject root
    Image image

    Properties

    GameObject

    Declaration
    public GameObject GameObject { get; }
    Property Value
    Type Description
    GameObject

    Image

    Declaration
    public Image Image { get; }
    Property Value
    Type Description
    Image

    Methods

    SetActive(bool)

    Declaration
    public void SetActive(bool on)
    Parameters
    Type Name Description
    bool on

    SetColor(Color)

    Declaration
    public void SetColor(Color color)
    Parameters
    Type Name Description
    Color color

    SetPreserveAspect(bool)

    Declaration
    public void SetPreserveAspect(bool preserve)
    Parameters
    Type Name Description
    bool preserve

    SetSprite(Sprite)

    Declaration
    public void SetSprite(Sprite sprite)
    Parameters
    Type Name Description
    Sprite sprite
    In this article
    © 2026 Serenity. All Rights Reserved