Class AssetReferenceBase
Asset reference utility. Keeps reference to the linked asset object and handles load/unload events.
Inheritance
AssetReferenceBase
Assembly: FlaxEngine.dll
File: Engine/Content/AssetReference.h
Syntax
public class AssetReferenceBase : public IAssetReference
Constructors
~AssetReferenceBase()
AssetReferenceBase()
Initializes a new instance of the AssetReferenceBase class.
Declaration
public AssetReferenceBase() = default
AssetReferenceBase(IAssetReference* owner)
Initializes a new instance of the AssetReferenceBase class.
Declaration
public AssetReferenceBase(IAssetReference* owner)
Parameters
|
IAssetReference
owner
The reference owner to keep notified about asset changes. |
Fields
_asset
_owner
Changed
Action fired when field gets changed (link a new asset or change to the another value).
Declaration
public Action Changed
Field Value
|
Action
|
Loaded
The asset loaded event (fired when asset gets loaded or is already loaded after change).
Declaration
public Action Loaded
Field Value
|
Action
|
Unload
The asset unloading event (should cleanup refs to it).
Declaration
public Action Unload
Field Value
|
Action
|
Methods
GetID()
GetManagedInstance()
Gets managed instance object (or null if no asset set).
Declaration
public MObject* GetManagedInstance() const
Returns
|
MObject
|
OnAssetChanged(Asset* asset, void* caller)
Declaration
public virtual void OnAssetChanged(Asset* asset, void* caller) override
Parameters
|
Asset
asset
|
|
void
caller
|
Overrides
OnAssetLoaded(Asset* asset, void* caller)
Declaration
public virtual void OnAssetLoaded(Asset* asset, void* caller) override
Parameters
|
Asset
asset
|
|
void
caller
|
Overrides
OnAssetUnloaded(Asset* asset, void* caller)
Declaration
public virtual void OnAssetUnloaded(Asset* asset, void* caller) override
Parameters
|
Asset
asset
|
|
void
caller
|