I’m not sure if this is a bug or I’m doing something wrong. According to docs , we can set texture to a model.
Simply what I did:
go.property("enemy_texture", resource.texture("/assests/pink.png"))
function init(self)
go.set('/go#model', "tex0", self.enemy_texture)
end
returns:
'/go#model' does not have any property called 'tex0'
Model has build-in model.material
Is this how suppose to work? Do you see anything wrong here?
We currently have no way of overriding the textures of a material for a model.
(We want a good way of overriding that on a per model instance basis)
The model does have the old texture0
-texture7
properties of a model, but they’re not exactly the same. They allow you to override the texture at that index for all materials assigned to that model.
4 Likes
Got it.
This works for me. Thank you.
3 Likes
vovs03
August 26, 2024, 3:10pm
4
selimanac in code you are use pink.png
, but in properties value set as blue.png
.
Nope, that wasn’t the problem. You can read the @Mathias_Westerdahl answer above.
Mathias_Westerdahl:
We currently have no way of overriding the textures of a material for a model.
(We want a good way of overriding that on a per model instance basis)
The model does have the old texture0
-texture7
properties of a model, but they’re not exactly the same. They allow you to override the texture at that index for all materials assigned to that model.
1 Like