Description
The SequenceData
property of the Texture
class provides information about the texture if it is a sprite sheet. This information is typically used in shaders to handle sprite animations or other effects that require knowledge of the sprite sheet layout. The data is encapsulated in a Vector4
, but the specific contents are generally not something you need to manipulate directly in most cases.
Usage
Use the SequenceData
property when you need to access the sprite sheet information of a texture. This is particularly useful when working with shaders that need to handle sprite animations. The property is read-only and provides a Vector4
that contains the necessary data for the shader to interpret the sprite sheet correctly.
Example
// Example of accessing SequenceData
Texture myTexture = ...; // Assume this is a valid texture object
Vector4 sequenceInfo = myTexture.SequenceData;
// Use sequenceInfo in a shader or other rendering logic
// For example, passing it to a shader uniform
shader.SetUniform("u_SequenceData", sequenceInfo);