Editor project window - detect new files.

Are there any way to force the editor project window to detect if there are new files?

Im building a xml file and putting it in a assetbundle. My only problem is that the (TextAsset)AssetDatabase.LoadAssetAtPath(…) does not register the file I just made untill I have tabed out and back into the Unity editor.

Ive both flushed and closed the stream writer so that should not be a problem. Anyways it does not matter how long it takes… if I do not tab out/in it will never be able to be loaded with the .LoadAssetAtPath(…).

//perlohmann

.bumpidibump!
Its getting pretty annoying to tab put and in again everytime I build a xml file and try to put it in a assetbundle.

There’s Assets->Refresh which has the ctrl/cmd + R shortcut.

or:

AssetDatabase.Refresh();

hehe well although your solution was kinda the same as tabbing it did lead me on track and I found that AssetDatabse.Refresh() does the trick =)

//perlohmann

Ugh looks like I didn’t read the question too closely - was not aware that you were looking for a scripting solution :slight_smile: