Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / releaseAssets

Function: releaseAssets() ​

ts
function releaseAssets(world, sources): AssetReleaseResult;

Defined in: assets/runtimeAssets.ts:478

Free loaded files: GPU memory and the bytes kept for them. A file that's wanted again just loads again.

A model an entity still shows stays, and so does anything still loading: both come back under kept, and the rest is freed. Releasing a prefab frees what's inside it the same way; release it again once what was on screen has gone to finish the job.

Parameters ​

ParameterType
worldWorld
sources| AssetSource | AssetSource[]

Returns ​

AssetReleaseResult