Hello I am doing something like flag creator that you can paint a flag, so this texture is generated and saved into resources. This texture is attached to a flag, so you can see the result, if you change anything. It has a problem, that unity does not recognise any change and the flag stay unchanged unless you restart the game. What works how to reload the texture is use to AssetDatabase.Refresh() What works perfectly inside unity Editor. Unfortunately this function is editor only, and it does not allow me to built the project. So I need something what would make refresh 1 asset at runtime after change. Or how to make this class to export and also works after build.
There is picture how it works you can select colors and patterns and it mix into texture which is used in materials on some objects like flags and shields or armor.
Thanks forAnswer. I can post some more screenshots or scripts, but that is I think unimportant, because main problem is that there is an asset what is changed but its older version is cached in memory and I need to call to reload or somehow access that memory and throw out the old version and update the newer one. Exactly what AssetDatabase.Refresh() does, but I have to access it also after build.
Thanks again.