Hello everybody,
I have created a small editor script that creates text files in my Resources folder.
I then noticed that after creating these files, Unity does not always refresh its memory of their content.
So after some research, I have found out about SetDirty, and I am using it like this on every file that I save in the Resources folder:
static void SetDirty( string path ) {
TextAsset textAsset = (TextAsset)AssetDatabase.LoadAssetAtPath( path, typeof(TextAsset) );
EditorUtility.SetDirty( textAsset );
}
This helps things a little, but still in order for Unity to re-import these assets and their refreshed content, I need to alt-tab away from Unity, and back in.
Am I doing anything wrong, have I missed something, or is this just the way it works?
Thanks.