Change to use static method for import path ui.
This commit is contained in:
@@ -144,20 +144,9 @@ namespace FlaxEditor.Windows.Assets
|
||||
|
||||
// Import settings
|
||||
base.Initialize(layout);
|
||||
|
||||
(proxy._window.Item as BinaryAssetItem).GetImportPath(out var path);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
layout.Space(5);
|
||||
layout.Label("Import Path:");
|
||||
var textBox = layout.TextBox().TextBox;
|
||||
textBox.TooltipText = "Path is not editable here.";
|
||||
textBox.IsReadOnly = true;
|
||||
textBox.Text = path;
|
||||
layout.Space(2);
|
||||
var button = layout.Button("Open Import Path in Explorer").Button;
|
||||
button.Clicked += () => FileSystem.ShowFileExplorer(Path.GetDirectoryName(path));
|
||||
}
|
||||
|
||||
// Creates the import path UI
|
||||
Utilities.Utils.CreateImportPathUI(layout, proxy._window.Item as BinaryAssetItem);
|
||||
|
||||
// Reimport
|
||||
layout.Space(10);
|
||||
|
||||
Reference in New Issue
Block a user