Want to assign asset on runtime

Hi All,
I want to assign a model on runtime to legacy model component
How can i do it or we can say , what is the correct syntax to do that ?
image

Hi @yasmeen_saber and welcome,

First of all better used the render component instead of model, that is getting deprecated and isn’t receiving updates.

Check the following engine example on how it loads a remote render asset and creates an entity from it, to add it to the scene:

https://playcanvas.github.io/#/graphics/model-asset

I will check it
Thanks @Leonidas