Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | nicfer | |
Old Version | Published before Godot 3 was released. |
Reply From: | Kamil Lewan |
textureButtonObj.set_normal_texture(preload("res://path_to_tileSET").tile_get_texture(ID))
Remember that:
- you should get/set scale too (that’s no auto)
- buttons have few textures (normal, hower, focused, disabled, pressed)
- you may get your tileSET from tileMAP by
get_node("tileMap").get_tileset()
- if tiles have regions you must use regions to texture
- you must know ID of tile in tileset