d3d: failed to create 2d texture error

We have an editor script that loops through our levels creating asset bundles for each level. Each level has quite a few 1280x720 .png images that have an importer max res setting of 2048.

I’m getting an out of memory crash eventually when building the bundles but the editor.log lists many of the following errors prior to the crash:

d3d: failed to create 2D texture id=3063 w=2048 h=1024 mips=1 d3dfmt=827611204 [out of memory]
failed to create 2D texture

a) how can I figure out which texture it’s complaining about?
b) since we’re calling AssetDatabase.LoadAssetAtPath to get the asset objects that get stuffed into the bundles, what is the proper way to release this memory so I no longer get the out of memory crashes?

thanks,
–Matt

Try to call Resources.UnloadUnusedAssets

So the solution to my problem was EditorUtility.UnloadUnusedAssetsIgnoreManagedReferences(); Was surprised I didn’t see this elsewhere in the forums based on my search.