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
SerenityImage
Assembly: Serenity.UnityUi.Infrastructure.dll
public sealed class SerenityImage
Constructors
Declaration
public SerenityImage(GameObject root, Image image)
Parameters
| Type |
Name |
Description |
| GameObject |
root |
|
| Image |
image |
|
Properties
Declaration
public GameObject GameObject { get; }
Property Value
| Type |
Description |
| GameObject |
|
Declaration
public Image Image { get; }
Property Value
Methods
Declaration
public void SetActive(bool on)
Parameters
| Type |
Name |
Description |
| bool |
on |
|
Declaration
public void SetColor(Color color)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
Declaration
public void SetPreserveAspect(bool preserve)
Parameters
| Type |
Name |
Description |
| bool |
preserve |
|
Declaration
public void SetSprite(Sprite sprite)
Parameters
| Type |
Name |
Description |
| Sprite |
sprite |
|