Copy Component From Existing Entity To New One

Hi guys,

Would it be possible to clone the model component from a preexisting entity in the hierarchy to one I have created using code? If so, how do I go about it?

It’s not a public API but you can see how the entity’s clone function works here https://github.com/playcanvas/engine/blob/master/src/framework/entity.js#L418

1 Like

Alright, will check it out, thanks.