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; }
/// <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); } } }
/// <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); } } }