Various improvements
This commit is contained in:
@@ -206,6 +206,11 @@ namespace FlaxEditor.GUI
|
||||
/// </summary>
|
||||
public event Action SelectedItemChanged;
|
||||
|
||||
/// <summary>
|
||||
/// The custom callback for assets validation. Cane be used to implement a rule for assets to pick.
|
||||
/// </summary>
|
||||
public Func<ContentItem, bool> CheckValid;
|
||||
|
||||
/// <summary>
|
||||
/// False if changing selected item is disabled.
|
||||
/// </summary>
|
||||
@@ -215,6 +220,8 @@ namespace FlaxEditor.GUI
|
||||
{
|
||||
if (_fileExtension != null && !item.Path.EndsWith(_fileExtension))
|
||||
return false;
|
||||
if (CheckValid != null && !CheckValid(item))
|
||||
return false;
|
||||
if (_type == ScriptType.Null)
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user