Finally got a usage for the Mesh component in my new project. And immediately having an issue.
Setting up vertex buffer with go.set() works, but setting up a texture doesn’t. In the docs there is “tex0” property, but using it gives a runtime error. When using “texture0” instead, I can get the default texture and setting it doesn’t produce a runtime error, but the texture doesn’t change on the screen.
go.property('other_texture', resource.texture())
function init(self)
go.set('#component', 'texture0', self.other_texture)
end
After go.set(), go.get() correctly returns the new texture reference. I tried changing tex0 to texture0 in the shader, but without success.
Is there anything wrong that I am doing?