Summary
If the
UnityEngine.Sprite.texture
is not already using the specified `texture`, this method replaces the
`sprite` with a cached duplicate which uses that `texture` instead.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Containing Type
- Sprite
Renderer Texture Swap
Syntax
public static bool TrySwapTexture(Dictionary<Sprite, Sprite> spriteMap, Texture2D texture, SecondarySpriteTexture[] secondaryTextures, ref Sprite sprite)
Parameters
Name | Type | Description |
---|---|---|
spriteMap | Dictionary |
|
texture | Texture2D | |
secondaryTextures | Secondary |
|
sprite | Sprite |
Return Value
Type | Description |
---|---|
bool |