[Studio] ecs.GltfModel Update Material

I instantiate a model with this code
ecs.Gltf Model.set(world, eid, {url: prefab}),
how can I change or update the material?

Hey! Welcome to the forums.

You want to set the Material component on the entity. You can view the properties here:

ecs.Material.set(world, eid, { r: 255, g: 0, b: 0, textureSrc: "assets/texture.png" })

Not working with Gltf Model, If I instantiate the built-in primitive as: ecs.BoxGeometry.set(world, eid, {width: 2.8, height: 0.8, depth: 1.9}) and set the Material it works fine but it doesn’t work with the Gltf Model