Esempio n. 1
0
        private static IEnumerator <object> ExecuteImportRequestCoroutine(ImportRequest request)
        {
            try {
                ExecuteImportRequest(request);
            } catch (Exception ex) {
                Debug.LogErrorFormat("Import error: {0}", ex);
                PtAnalytics.SendException(ex, isFatal: false);
                EditorUtility.DisplayDialog("Error",
                                            "There was an error importing the asset. Please check the logs for more information.", "OK");
            }

            yield break;
        }
Esempio n. 2
0
 /// <summary>
 /// Called by Unity to inform us that new assets were imported.
 /// </summary>
 static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets,
                                    string[] movedAssets, string[] movedFromAssetPaths)
 {
     foreach (string localAssetPath in importedAssets)
     {
         ImportRequest request;
         if (importRequests.TryGetValue(localAssetPath, out request))
         {
             try {
                 ExecuteImportRequest(request);
             } catch (Exception ex) {
                 Debug.LogErrorFormat("Import error: {0}", ex);
                 PtAnalytics.SendException(ex, isFatal: false);
             }
             importRequests.Remove(localAssetPath);
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Called by Unity to inform us that new assets were imported.
 /// </summary>
 static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets,
                                    string[] movedAssets, string[] movedFromAssetPaths)
 {
     foreach (string localAssetPath in importedAssets)
     {
         ImportRequest request;
         if (importRequests.TryGetValue(localAssetPath, out request))
         {
             try {
                 ExecuteImportRequest(request);
             } catch (Exception ex) {
                 Debug.LogErrorFormat("Import error: {0}", ex);
                 PtAnalytics.SendException(ex, isFatal: false);
                 EditorUtility.DisplayDialog("Error",
                                             "There was an error importing the asset. Please check the logs for more information.", "OK");
             }
             importRequests.Remove(localAssetPath);
         }
     }
 }