This Gist was moved into its own Repository at https://github.com/dploeger/godot-migrationnotes
Please fork that repository and send pull request for updates. Thanks!
This Gist was moved into its own Repository at https://github.com/dploeger/godot-migrationnotes
Please fork that repository and send pull request for updates. Thanks!
According to godotengine/godot#15374 (comment)
create
or create_from_data()
must be called after Image.new()
2.1 :
var img = Image.new()
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()
3.0
var img = Image.new()
img.create(1, 1, false, Image.FORMAT_RGBA8)
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()
Thanks, everybody. I've updated the gist.