Hello! I am currently previewing the levels of my game in the menu using a viewport capture. However, the game has a level editor and whenever a level is edited, I take a new screenshot and save it in the file system with the same name. I then replace the sprite with the new image by loading it. Unfortunately, the image only updates after I close and reopen the game. I am unsure if Godot keeps images in the cache or if there is another issue at play. Does anyone have any suggestions for resolving this?
$SubViewport.get_texture().get_image().save_png(singleton.capture_path + ".png")
level_image.texture_normal = load(singleton.capture_path + ".png")