Skip to content

@relu-interactives/spatial-ecs


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

Function: reloadModelEntity() ​

ts
function reloadModelEntity(
   world, 
   entityId, 
   isEditor): boolean;

Defined in: factories/objects/ModelFactory.ts:251

Load a model entity's file again (it was rewritten: optimised, re-rigged, its animations edited) and swap it in. The old loaded scene is removed and its own geometry and materials disposed; the entity, its components and its children stay, and objects attached to its bones move onto the new ones. Returns false when the entity has no model to reload.

Parameters ​

ParameterType
worldWorld
entityIdnumber
isEditorboolean

Returns ​

boolean