JonasPL
If you do what I described above and set the script to be a tool, the resource will be re-initialized when changing the property value in editor gui:
@tool
class_name MyTexture
extends ImageTexture
@export var value: int = 100: set = set_value
func set_value(v):
value = v
_init()
func _init():
var img: Image = Image.new()
img.set_data(1, 1, false,Image.FORMAT_RGBA8, PackedByteArray([value, 0, 0, 255]))
img.resize(64, 64)
set_image(img)
You'll most likely need to restart the project for this to take effect.