Skip to content

Instantly share code, notes, and snippets.

@dploeger
Last active April 18, 2018 03:26
Show Gist options
  • Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Migration Notes Godot 2 => Godot 3
@dploeger
Copy link
Author

dploeger commented Jan 3, 2018

Thanks, everybody. I've updated the gist.

@Nutriz
Copy link

Nutriz commented Jan 6, 2018

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment