# LoadSkeleton2DFromSpineFile

## Description

Loads a Spine animation exported in the JSON format. Please see the guide section for details on what is supported. Returns an ID to use to reference this skeleton. You must first load the atlas image exported by Spine into an AGK image with the normal LoadImage command and pass it into this function. You can choose to load animations as well, or just the sprites and bones and move or modify them manually. You can use the scale value to change the size of the sprites and bones to match your chosen resolution. A value of 1 will not change the sizes, a value of 2 will make everything twice as big, a value of 0.5 will half the size, and so on.

## Definition

integer LoadSkeleton2DFromSpineFile( filename, scale, atlasImage, loadAnim )

UINT agk::LoadSkeleton2DFromSpineFile( const char* filename, float scale, UINT atlasImage, int loadAnim )

LoadSkeleton2DFromSpineFile( iSkeleton, filename, scale, atlasImage, loadAnim )

void agk::LoadSkeleton2DFromSpineFile( UINT iSkeleton, const char* filename, float scale, UINT atlasImage, int loadAnim )

## Parameters

- filename - Name of the file to load, should be the .json export from Spine
- scale - The amount to scale the object sizes
- atlasImage - ID of the atlas image containing all the images
- loadAnim - 1 to load animation, 0 to only load sprites and bones
- iSkeleton - ID to use for this skeleton