using System.Threading.Tasks;
namespace UnityEditor.U2D.Tooling.Analyzer
{
///
/// Provides utility methods for opening analyzer windows and performing analysis operations.
///
public class AnalyzerUtility
{
///
/// Opens a new analyzer window and performs analysis on the specified paths.
///
/// An array of file or directory paths to analyze.
///
/// A task that represents the asynchronous operation. The task result contains
/// instance that provides access to the analysis results.
///
public static async Task OpenWindowAndAnalyze(string[] path)
{
var window = EditorWindow.CreateWindow();
window.Show();
await window.Analyze(path);
return window;
}
}
}