Let's say i have a 100x100px sprite in a very simple scene.
I want to manually modify the sprite colors. For example i want to make all of its pixels green.
Right now, the sprite has an ImageTexture. I am procedurally assigning an Image object to the ImageTexture.
Image i = new Image();
i.Create(100, 100, false, Image.Format.Rgb8);
ImageTexture t = this.Texture as ImageTexture;
i.SetPixel(0, 0, new Color(1f, 1f, 1f));
This causes godot to throw an error:
Condition ' !texture->active ' is true.
ImageTexture.cs:127 @ void Godot.ImageTexture.SetData(Godot.Image )
How do i go about doing this properly?