Hi I have an entity with a bunch of scripts attached. At runtime I want to modify the entity so that it is exactly the same apart from the model is swapped with a different model(scripts remain the same etc).
I have tried modifying the asset of the render component with a straight glb but it doesnt work. It seems I manually need to replace both the material and the mesh…and the mesh normally has some unfriendly name like mesh.002 etc. I just want to be able to replace car with motorbike for example; a direct reference to a glb container.
Thanks. Yes, Im loading a glb with multiple parts . My code just does this (below). There are no errors but no mesh appears. Im guessing Im missing the instantiateEntity() method. Could you explain that more ? I dont want to instantiate any new entities, just replace the components that already exist within the existing entity.