Hi,
I have a post process scene script that will create some textures based off the scene, and create high/low quality versions.
My process is;
- I save these textures out to the resources folder using System.IO, then I import the textures via AssetDatabase.ImportAsset
- I use the TextureImporter to modify some settings on the texture then I call SaveAndReimport
- To be doubly sure I also do a call to AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport) when I finish
When I finish my build and try to load via resources, the files do not load and return null. For the next build, if I don’t clear my resources folder (which isn’t an option in the final solution I require), the textures are able to be loaded ok.
This leads me to believe the resources folder is built 1st. Is that correct, or is there something I am missing in the import process?