I tried to use dynamically ImageTexture that was created from Image created in code for a Sprite texture, but it seems that all set_pixelv operations aren't loaded with it (I just get the fill function working), unless I save it to a disk or use it for TextureRect (which has purpose UI, while I would like to manipulate Sprite textures during the game but currently I am just trying to see if that's even possible by using dynamic ImageTexture). Is there anyway I could make my ImageTexture working as a Sprite texture without the need of saving it up to disk and then reloading it or is it simply not possible in Godot 3.6? Here is how the code looks like:
func _ready():
var spriteTexture: ImageTexture = ImageTexture.new();
var image: Image = Image.new()
image.create(50, 50, false, Image.FORMAT_RGBA8)
image.fill(Color8(255,255,255))
image.lock()
image.set_pixelv(Vector2(6,6), Color8(0,0,0))
image.set_pixelv(Vector2(35,22), Color8(0,0,0))
spriteTexture.create_from_image(image)
texture = spriteTexture