StarArawn / bevy_tiled

A plugin for rendering tiled maps.
MIT License
151 stars 40 forks source link

Individual Tiles #18

Closed TomKnightDev closed 3 years ago

TomKnightDev commented 3 years ago

Is it possible to update the tilemap at run time? For example, changing a land tile to a water tile? If so, how do I get the individual tiles via a system or event? I've tried adding the entity to resources at the point of creation of the TiledMapComponents, but I'm unsure which struct I should be looking for. Is it the tiled::Map struct?

I'd really appreciate any help.

TomKnightDev commented 3 years ago

Ignore this, I've figured it out. If this is of interest to anyone in the future (or there's an easier/better way), you can get the Map from the Assets by storing the Entity of the TiledMapComponents at the point of creation. I hadn't considered that it was of type Handle, which is why I failed originally.

Sorry for the unnecessary issue raise.