The GetSequenceFrameCount
method retrieves the number of frames in a specific sequence of a texture. This is particularly useful when dealing with animated textures or sprite sheets where each sequence may contain multiple frames.
The GetSequenceFrameCount
method retrieves the number of frames in a specific sequence of a texture. This is particularly useful when dealing with animated textures or sprite sheets where each sequence may contain multiple frames.
To use the GetSequenceFrameCount
method, you need to have an instance of the Texture
class. Call this method with the sequence ID for which you want to know the frame count.
// Assuming 'texture' is an instance of Sandbox.Texture int sequenceId = 0; // The ID of the sequence you are interested in int frameCount = texture.GetSequenceFrameCount(sequenceId); // Output the number of frames in the sequence // Note: Replace 'sequenceId' with the actual sequence ID you want to query System.Console.WriteLine($"Sequence {sequenceId} has {frameCount} frames.");