Skip to content

LoadSpriteAnimation

Description

Loads a SpriteAnimation and returns the ID of it.

Parameters

path

The file path to load the SpriteAnimation file from, relative to Data/Sprites/.

scope

The asset's scope, may be SCOPE_GLOBAL or SCOPE_STAGE.

Return Value

Returns the ID of the loaded animation file as a uint16. The return value will be -1 if the animation file failed to load.

Syntax

RSDK.LoadSpriteAnimation(const char* path, Scopes scope);
SpriteAnimation.Load(const char* path, Scopes scope);

Example

MyObject->aniFrames = RSDK.LoadSpriteAnimation("Test/MyAnim.bin", SCOPE_STAGE);
sVars->aniFrames.Load("Test/MyAnim.bin", SCOPE_STAGE);