Extensions for Images
public static class ImageExt
Inheritance System.Object ImageExt
Loads a sprite reference to this image
public static void LoadSprite(this Image image, SpriteReference spriteReference);
image UnityEngine.UI.Image
spriteReference Il2CppAssets.Scripts.Utils.SpriteReference
Saves an image as a PNG files
Coded in a robust manner that should work for all images, including those with multiple sprites on them being used
public static void SaveToPNG(this Image image, string filePath);
image UnityEngine.UI.Image
filePath System.String
Absolute file path on the machine to save the file to
Set the sprite for this image
public static void SetSprite(this Image image, Sprite sprite);
image UnityEngine.UI.Image
sprite UnityEngine.Sprite
Sprite to change image to
Set the sprite for this image
public static void SetSprite(this Image image, SpriteReference spriteReference);
image UnityEngine.UI.Image
spriteReference Il2CppAssets.Scripts.Utils.SpriteReference
Sprite to change image to
Set the sprite for this image
public static void SetSprite(this Image image, string guid);
image UnityEngine.UI.Image
guid System.String
Sprite to change image to
Sets the sprite of this image to one with the given name in the named sprite atlas
public static void SetSpriteFromAtlas(this Image image, string atlas, string spriteName);
image UnityEngine.UI.Image
atlas System.String
spriteName System.String