SpriteRendererTextureSwap.

TrySwapTexture(Dictionary<Sprite, Sprite>, Texture2D, SecondarySpriteTexture[], Sprite) Method

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
SpriteRendererTextureSwap

Syntax

public static bool TrySwapTexture(Dictionary<Sprite, Sprite> spriteMap, Texture2D texture, SecondarySpriteTexture[] secondaryTextures, ref Sprite sprite)

Parameters

Name Type Description
spriteMap Dictionary<Sprite, Sprite>
texture Texture2D
secondaryTextures SecondarySpriteTexture[]
sprite Sprite

Return Value

Type Description
bool