mirror of
https://github.com/Relintai/utilities_gamedev.git
synced 2024-11-12 10:35:11 +01:00
13 lines
213 B
GDScript3
13 lines
213 B
GDScript3
|
tool
|
||
|
extends TextureRect
|
||
|
|
||
|
func set_texture(tex: Texture)-> void:
|
||
|
texture = tex
|
||
|
|
||
|
if tex is PackerImageResource:
|
||
|
var t : ImageTexture = ImageTexture.new()
|
||
|
|
||
|
t.create_from_image(tex.data, 0)
|
||
|
|
||
|
texture = t
|