You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImageTexture's create_from_image was changed to a static function that returns a result,. During a migration process from 3.x to 4.x there is no warning, comment or error for this, which means code such as:
# 3.xvarmy_img :Image=Image.new()
varmy_texture :ImageTexture=ImageTexture.new()
my_img.create_from_data(32, 32, false, Image.FORMAT_RGBA8, some_data)
my_texture.create_from_image(my_img) # This line should have changed in some way$some_TextureRect.texture=my_texture
will not be changed in the conversion process and silently not work (in part because of #66100 )
A potential fix would be to alter the line indicated above to:
my_texture=my_texture.create_from_image(my_img) # Now it works
I'd like to take this opportunity to please request a list (or a way to check) of functions that are now static and/or have a return value that didn't in 3.x
Steps to reproduce
Code shown above.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
FileAccess' open() has a similar issue. Calling static functions on a non-static instance is valid, and I think making it print a warning by default could get in the way.
I think the best way to fix this is to make the converter add a comment on such lines, saying they can't be converted manually and explaining what should be done.
Godot version
v4.0.beta.custom_build [18d2035]
System information
Windows 10
Issue description
ImageTexture's create_from_image was changed to a static function that returns a result,. During a migration process from 3.x to 4.x there is no warning, comment or error for this, which means code such as:
will not be changed in the conversion process and silently not work (in part because of #66100 )
A potential fix would be to alter the line indicated above to:
I'd like to take this opportunity to please request a list (or a way to check) of functions that are now static and/or have a return value that didn't in 3.x
Steps to reproduce
Code shown above.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: