reckfellENGINE

AnimatedTexture

Obsolete frame-based Texture2D; choose task-specific animation for new code.

On this page
class AnimatedTextureReckfellSharpInherits Texture2D

SDK 1.0.0 marks the entire class Obsolete: its implementation does not work properly and may be removed. This documents existing API rather than recommending it for new projects. Use AnimatedSprite2D with SpriteFrames for animated sprites, or AnimationPlayer for animating a texture property. Neither is a universal drop-in resource replacement wherever Texture2D is accepted.

Stores up to 256 texture/duration slots. Frames activates the first N slots; SetFrameTexture does not increase Frames. Slot indices 0…255 differ from valid CurrentFrame indices 0…Frames-1. Select a valid CurrentFrame before reducing Frames: its setter neither clamps the index nor resets time or clears hidden slots. Consumers sharing one resource also share its current frame.

For an existing resource configure slots with Pause=true, assign positive finite durations, then Frames and CurrentFrame, and finally release pause. Stop with Pause rather than SpeedScale=0: the current code gives zero speed a zero frame limit and reverse-direction branch. Negative nonzero speed reverses playback. OneShot holds the terminal frame without setting Pause or providing a completion signal.

Source inspection shows an OS-clock timer updated at frame_pre_draw. Time accumulates even while paused, allowing catch-up transitions after resume. CurrentFrame clears accumulated time even when assigned its existing index. Texture2D dimensions follow the current frame; use equal frame sizes to avoid changing consumer geometry. AtlasTexture is unsuitable as a separate frame because the proxy receives its RID without atlas-region metadata. An empty slot does not clear the previously bound proxy; null is not a transparent frame.

Setters neither emit Resource.Changed nor forward child-texture changes automatically. The combined suite ran 23 Windows headless state checks for AnimatedTexture/MeshTexture; this class was checked for values, slots, references and dimensions. Playback timing, visible frames and rendering correctness were not established.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AnimatedTextureConstructor
# AnimatedTexture
C#
public AnimatedTexture();

Creates an owned obsolete resource: Frames=1, CurrentFrame=0, Pause=false, OneShot=false, SpeedScale=1; every slot is null with duration 1 second. Not recommended for new projects.

Properties5

CurrentFrameProperty
# CurrentFrame
C#
public int CurrentFrame { get; set; }

Current index 0…Frames-1. Every assignment, including the same value, resets accumulated time; the proxy updates at the next render callback rather than synchronously in the setter.

FramesProperty
# Frames
C#
public int Frames { get; set; }

Active frame count 1…256. Does not clear inactive slots, change CurrentFrame or reset time. Select a valid CurrentFrame before decreasing it.

OneShotProperty
# OneShot
C#
public bool OneShot { get; set; }

Holds the last frame forward or the first in reverse. Reaching the end neither sets Pause nor emits a completion signal.

PauseProperty
# Pause
C#
public bool Pause { get; set; }

Prevents frame transitions without resetting the index. Current source still accumulates elapsed time, allowing catch-up after resume. Does not promise exact phase-preserving continuation.

SpeedScaleProperty
# SpeedScale
C#
public float SpeedScale { get; set; }

Direction/speed multiplier: -1000 ≤ scale < 1000. Nonzero values give a duration/abs(scale) frame limit. Do not use zero as pause: the current implementation uses a zero limit and reverse branch. Use Pause.

Methods14

GetCurrentFrameint
# GetCurrentFrame
C#
public int GetCurrentFrame();

Returns CurrentFrame. Current index 0…Frames-1. Every assignment, including the same value, resets accumulated time; the proxy updates at the next render callback rather than synchronously in the setter.

Returns int

Current CurrentFrame value.

GetFrameDurationfloat
# GetFrameDuration
C#
public float GetFrameDuration(int frame);

Reads the configured slot 0…255 duration without applying SpeedScale. A new slot has 1 second.

Parameters
NameTypeDefault
frameint—
frame

Slot index 0…255, possibly outside active Frames.

Returns float

Stored duration in seconds before speed scaling.

GetFrameTextureTexture2D
# GetFrameTexture
C#
public Texture2D GetFrameTexture(int frame);

Returns the shared texture of slot 0…255, including inactive slots, or null. Not a copy: do not separately dispose an alias still used by an owner.

Parameters
NameTypeDefault
frameint—
frame

Slot index 0…255, possibly outside active Frames.

Returns Texture2D

Shared resource or null, not an independent copy.

GetFramesint
# GetFrames
C#
public int GetFrames();

Returns Frames. Active frame count 1…256. Does not clear inactive slots, change CurrentFrame or reset time. Select a valid CurrentFrame before decreasing it.

Returns int

Current Frames value.

GetOneShotbool
# GetOneShot
C#
public bool GetOneShot();

Returns OneShot. Holds the last frame forward or the first in reverse. Reaching the end neither sets Pause nor emits a completion signal.

Returns bool

Current OneShot value.

GetPausebool
# GetPause
C#
public bool GetPause();

Returns Pause. Prevents frame transitions without resetting the index. Current source still accumulates elapsed time, allowing catch-up after resume. Does not promise exact phase-preserving continuation.

Returns bool

Current Pause value.

GetSpeedScalefloat
# GetSpeedScale
C#
public float GetSpeedScale();

Returns SpeedScale. Direction/speed multiplier: -1000 ≤ scale < 1000. Nonzero values give a duration/abs(scale) frame limit. Do not use zero as pause: the current implementation uses a zero limit and reverse branch. Use Pause.

Returns float

Current SpeedScale value.

SetCurrentFramevoid
# SetCurrentFrame
C#
public void SetCurrentFrame(int frame);

Sets CurrentFrame. Current index 0…Frames-1. Every assignment, including the same value, resets accumulated time; the proxy updates at the next render callback rather than synchronously in the setter.

Parameters
NameTypeDefault
frameint—
frame

Index 0…Frames-1; assignment also resets time.

SetFrameDurationvoid
# SetFrameDuration
C#
public void SetFrameDuration(int frame, float duration);

Stores a slot 0…255 duration in seconds. The setter validates neither sign nor finiteness. Use positive finite values; 0 gives a zero limit and can be skipped, while negatives are not a supported playback mode.

Parameters
NameTypeDefault
frameint—
durationfloat—
frame

Slot index 0…255, possibly outside active Frames.

duration

Positive finite time in seconds before speed scaling.

SetFrameTexturevoid
# SetFrameTexture
C#
public void SetFrameTexture(int frame, Texture2D texture);

Stores a shared Texture2D reference in slot 0…255 independently of Frames. Does not increase Frames or copy the texture; null clears the slot. The resource itself is forbidden as a frame. AtlasTexture is not supported as a cropped frame.

Parameters
NameTypeDefault
frameint—
textureTexture2D—
frame

Slot index 0…255, possibly outside active Frames.

texture

Shared Texture2D or null to clear. For an AnimatedTexture frame use neither AtlasTexture nor the animated resource itself.

SetFramesvoid
# SetFrames
C#
public void SetFrames(int frames);

Sets Frames. Active frame count 1…256. Does not clear inactive slots, change CurrentFrame or reset time. Select a valid CurrentFrame before decreasing it.

Parameters
NameTypeDefault
framesint—
frames

Active slot count 1…256; adjust CurrentFrame before decreasing it.

SetOneShotvoid
# SetOneShot
C#
public void SetOneShot(bool oneShot);

Sets OneShot. Holds the last frame forward or the first in reverse. Reaching the end neither sets Pause nor emits a completion signal.

Parameters
NameTypeDefault
oneShotbool—
oneShot

true holds the terminal frame; false enables wrapping.

SetPausevoid
# SetPause
C#
public void SetPause(bool pause);

Sets Pause. Prevents frame transitions without resetting the index. Current source still accumulates elapsed time, allowing catch-up after resume. Does not promise exact phase-preserving continuation.

Parameters
NameTypeDefault
pausebool—
pause

true prevents transitions, false permits them; accumulated time is retained.

SetSpeedScalevoid
# SetSpeedScale
C#
public void SetSpeedScale(float scale);

Sets SpeedScale. Direction/speed multiplier: -1000 ≤ scale < 1000. Nonzero values give a duration/abs(scale) frame limit. Do not use zero as pause: the current implementation uses a zero limit and reverse branch. Use Pause.

Parameters
NameTypeDefault
scalefloat—
scale

Finite nonzero multiplier -1000 ≤ scale < 1000. Stop using Pause.

Fields and constants1

MaxFramesField
# MaxFrames
C#
public const long MaxFrames = 256;

Capacity of 256 slots; a C# const long. Neither current Frames nor maximum valid index: the last index is 255.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.