Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MrMonk | |
Old Version | Published before Godot 3 was released. |
This damn code doesn’t work on Android but works fine on Windows.
Any ideas ? thanks !
extends Node2D
func _ready():
var img_name = load('bk.jpg').get_data()
var imgt = ImageTexture.new()
var mRect2 = Rect2(0,0, 500,500)
imgt.create_from_image(img_name.get_rect(mRect2))
var temp = Sprite.new()
temp.set_texture(imgt)
add_child(temp)