I am sure it's documented or been asked already, but I just can't find the right set of keyword to find the answer...
basically, I have a testAsset, an xml file, that I parse with a script. the scripts now runs in edit Mode.
I'd like to detect automatically that the xml file has changed and re parse it, instead of have to have a custom inspector with a button to trigger the parsing.
basically, how can I be notified in my script ( or in the custom inspector script), that an sset has changed?
thanks in advance.
asked Feb 16 '12 at 06:05 PM
I know that I'm kind of doing some Necromancy here, but I was looking for the solution to this problem and thought it would be nice to document the solution that I found here for any further searchers.
From the documentation at [AssetPostprocessor.OnPostprocessAllAssets] I have my C# script:
This helped my issue where I needed to know the Folder, filename, and the file extension of every file that is changed. Keep in mind that in order to use AssetPostprocessor you must include: using UnityEditor; : http://docs.unity3d.com/Documentation/ScriptReference/AssetPostprocessor.OnPostprocessAllAssets.html
answered Oct 09 '12 at 10:42 PM