void OnGUI() { var newSetting = EditorGUILayout.ObjectField(_exportSetting, typeof(PackageExporterSetting), false) as PackageExporterSetting; if (newSetting == null) { return; } if (newSetting != _exportSetting) { _exportSetting = newSetting; _editor = Editor.CreateEditor(_exportSetting); } _editor.OnInspectorGUI(); if (GUILayout.Button("エクスポート")) { RunExpotPackage(_exportSetting); } }
public static void RunExpotPackage(PackageExporterSetting setting) { ExportPackage(setting.TargetPaths, setting.ExportName, setting.Options); }