How to change the texture of a sprite in a GO generated by a factory (SOLVED)

Hi. I have multiple objects generated by a factory in runtime. Each one has 1 sprite. Need to change the sprite texture of each GO.

I tried something like this, but doesnt work.

sprite.play_flipbook(id, “texture”) //id of the GO created in factory

Any idea?

The game object could have multiple sprites. You need to specify which one.

Create a URL like this:

msg.url(nil, id, “spriteid”)

1 Like

works perfect, thanh ou :slight_smile: