How can I get image data from a script?
I have an ImageTexture variable, and am trying to get the color from it at a certain position. I found I can get the Image with:
and there's a function to get a pixel:
but if I try it, I get this error:
Image must be locked with 'lock()' before using get_pixel().
so I tried putting this line before get_pixel():
but nothing changed. Do you have any idea why?