Class SpriteHandler
A handler class for adding custom sprites into the game.
public static class SpriteHandler
- Inheritance
-
SpriteHandler
- Inherited Members
Methods
RegisterSprite(Group, string, string)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, string filePathToImage)
Parameters
groupSpriteManager.Group- The sprite group.
idstring- The sprite internal identifier.
filePathToImagestring- The file path to image.
- See Also
RegisterSprite(Group, string, string, TextureFormat)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, string filePathToImage, TextureFormat format)
Parameters
groupSpriteManager.Group- The sprite group.
idstring- The sprite internal identifier.
filePathToImagestring- The file path to image.
formatTextureFormatThe texture format. By default, this uses UnityEngine.TextureFormat.BC7.
https://docs.unity3d.com/ScriptReference/TextureFormat.BC7.html
Don't change this unless you really know what you're doing.
- See Also
RegisterSprite(Group, string, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(SpriteManager.Group group, string id, Sprite sprite)
Parameters
groupSpriteManager.Group- The sprite group this sprite will be added to.
idstring- The sprite internal identifier.
spriteSprite- The sprite to be added.
RegisterSprite(TechType, string)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, string filePathToImage)
Parameters
typeTechType- The techtype paired to this sprite.
filePathToImagestring- The file path to image to be converted into a sprite.
- See Also
RegisterSprite(TechType, string, TextureFormat)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, string filePathToImage, TextureFormat format)
Parameters
typeTechType- The techtype paired to this sprite.
filePathToImagestring- The file path to image to be converted into a sprite.
formatTextureFormatThe texture format. By default, this uses UnityEngine.TextureFormat.BC7.
https://docs.unity3d.com/ScriptReference/TextureFormat.BC7.html
Don't change this unless you really know what you're doing.
- See Also
RegisterSprite(TechType, Sprite)
Registers a new sprite to the game.
public static void RegisterSprite(TechType type, Sprite sprite)
Parameters
typeTechType- The techtype paired to this sprite.
spriteSprite- The sprite to be added.