Class AssetPickerValidator
Manages and converts the selected content item to the appropriate types. Useful for drag operations.
Inheritance
Namespace: FlaxEditor.Content
Assembly: FlaxEngine.CSharp.dll
Syntax
public class AssetPickerValidator : Object, IContentItemOwner
Constructors
AssetPickerValidator()
Initializes a new instance of the AssetPickerValidator class.
Declaration
public AssetPickerValidator()
AssetPickerValidator(ScriptType)
Initializes a new instance of the AssetPickerValidator class.
Declaration
public AssetPickerValidator(ScriptType assetType)
Parameters
FlaxEditor.Scripting.ScriptType
assetType
The asset types that this picker accepts. |
Fields
CheckValid
The custom callback for assets validation. Cane be used to implement a rule for assets to pick.
Declaration
public Func<ContentItem, bool> CheckValid
Field Value
System.Func<FlaxEditor.Content.ContentItem, System.Boolean>
|
Properties
AssetType
Gets or sets the assets types that this picker accepts (it supports types derived from the given type). Use FlaxEditor.Scripting.ScriptType.Null for generic file picker.
Declaration
public ScriptType AssetType { get; set; }
Property Value
FlaxEditor.Scripting.ScriptType
|
FileExtension
Gets or sets the content items extensions filter. Null if unused.
Declaration
public string FileExtension { get; set; }
Property Value
System.String
|
SelectedAsset
Gets or sets the selected asset object.
Declaration
public Asset SelectedAsset { get; set; }
Property Value
Asset
|
SelectedID
Gets or sets the selected asset identifier.
Declaration
public Guid SelectedID { get; set; }
Property Value
System.Guid
|
SelectedItem
Gets or sets the selected item.
Declaration
public ContentItem SelectedItem { get; set; }
Property Value
FlaxEditor.Content.ContentItem
|
SelectedPath
Gets or sets the selected content item path.
Declaration
public string SelectedPath { get; set; }
Property Value
System.String
|
Methods
IsValid(ContentItem)
Returns whether item is valid.
Declaration
public bool IsValid(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
Returns
System.Boolean
|
OnDestroy()
Call to remove reference from the selected item.
Declaration
public void OnDestroy()
OnItemDeleted(ContentItem)
Declaration
public void OnItemDeleted(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
OnItemDispose(ContentItem)
Declaration
public void OnItemDispose(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
OnItemReimported(ContentItem)
Declaration
public void OnItemReimported(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
OnItemRenamed(ContentItem)
Declaration
public void OnItemRenamed(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
OnSelectedItemChanged()
Called when selected item gets changed.
Declaration
protected virtual void OnSelectedItemChanged()
Events
SelectedItemChanged
Occurs when selected item gets changed.
Declaration
public event Action SelectedItemChanged
Event Type
System.Action
|