Class AssetEditorWindowBase<T>
Generic base class for asset editors.
Inheritance
Namespace: FlaxEditor.Windows.Assets
Assembly: FlaxEngine.CSharp.dll
Syntax
public abstract class AssetEditorWindowBase<T> : AssetEditorWindow, IComparable, IDrawable, IEditable, IContentItemOwner where T : Asset
Type Parameters
T
Asset type. |
Constructors
AssetEditorWindowBase(Editor, AssetItem)
Initializes a new instance of the AssetEditorWindow class.
Declaration
protected AssetEditorWindowBase(Editor editor, AssetItem item)
Parameters
Editor
editor
The editor. |
FlaxEditor.Content.AssetItem
item
The item. |
Fields
_asset
The asset reference.
Declaration
protected T _asset
Field Value
T
|
_isWaitingForLoaded
Flag set to true if window is waiting for asset to be loaded (to send OnAssetLoaded() or OnAssetLoadFailed() events).
Declaration
protected bool _isWaitingForLoaded
Field Value
System.Boolean
|
Properties
Asset
Gets the asset.
Declaration
public T Asset { get; }
Property Value
T
|
Methods
LoadAsset()
Loads the asset.
Declaration
protected virtual T LoadAsset()
Returns
T
Loaded asset or null if cannot do it. |
OnAssetLinked()
Called when asset gets linked and window can setup UI for it.
Declaration
protected virtual void OnAssetLinked()
OnAssetLoaded()
Called when asset gets loaded and window can setup UI for it.
Declaration
protected virtual void OnAssetLoaded()
OnAssetLoadFailed()
Called when asset fails to load and window can setup UI for it.
Declaration
protected virtual void OnAssetLoadFailed()
OnItemReimported(ContentItem)
Declaration
public override void OnItemReimported(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
Overrides
OnShow()
Called when window shows.
Declaration
protected override void OnShow()
Overrides
RefreshAsset()
Drops any loaded asset data and refreshes the UI state.
Declaration
public void RefreshAsset()
ReloadAsset()
Reloads the asset (window will receive OnAssetLoaded() or OnAssetLoadFailed() events).
Declaration
public void ReloadAsset()
UnlinkItem()
Unlinks the item. Removes reference to it and unbinds all events.
Declaration
protected override void UnlinkItem()
Overrides
Update(Single)
Perform control update and all its children
Declaration
public override void Update(float deltaTime)
Parameters
System.Single
deltaTime
Delta time in seconds |