Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetImportLog(string)

Retrieves logs generated during the import of the asset at path.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static ImportLog GetImportLog(string path)

Parameters

path

Returns

Type

Description

ImportLog

Remarks

Examples

using UnityEngine;using UnityEditor;public class GetImportLogExample{ [MenuItem("Tools/GetImportLogExample")] static void Example() { var assetPath = "Path/To/Your/Asset"; //Get import log for the specified asset var log = AssetImporter.GetImportLog(assetPath); //Log the import log entries if (log != null) { Debug.Log($"Import log for {assetPath}: {log.logEntries.Length} entries."); foreach (var entry in log.logEntries) { Debug.Log(entry.message); } } else { Debug.Log($"No import log found for {assetPath}"); } }}