Пример #1
0
    static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
    {
        var allChangedAssets = movedAssets.Concat(movedFromAssetPaths).Concat(importedAssets);

        PythonScriptsDatabase.AssetsStartUpdating();
        foreach (string assetPath in allChangedAssets)
        {
            bool isPythonScript = PythonUtils.IsPythonFile(assetPath);
            if (!isPythonScript)
            {
                continue;
            }
            PythonScriptsDatabase.UpdateScript(assetPath);
        }
        PythonScriptsDatabase.AssetsFinishedUpdating();
    }
Пример #2
0
 public static bool IsPythonFile(Object asset)
 {
     return(PythonScriptsDatabase.GetScriptInstance(asset) != null);
 }