xyz
Also, have you tried changing the cache mode when calling ResourceLoader::load()
I tried calling this in runtime - does nothing:
ResourceLoader.Load("res://MyImage.png", null, ResourceLoader.CacheMode.Replace);
ResourceLoader.Load("res://.godot/imported/MyImage.png-e50e3f880ea2b769c7af2908269b6084.ctex", null, ResourceLoader.CacheMode.Replace);
Thanks for looking into this, if you want to reproduce the issue:
- Create a new Godot project with a default scene that has a Sprite node (showing a texture like res://Image.png)
- Close the Godot editor and now run the project from an external code editor - note that Image.png is displayed correctly
- Now change the content of Image.png (using Photoshop/Gimp to edit the Image.png directly on disk)
- Now try running the project from the code editor once more- note that the old PNG is still showing
I tried deleting the .ctex/.md5/.png.import files (I tried all combinations), the only result is that the PNG isn't shown in game.
I wonder if there is a way to get the game to refresh the cache of the image, either in runtime or by passing a parameter when the game is started or something similar...