Search Results for

    Show / Hide Table of Contents

    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

    Constructors

    ~AssetReferenceBase()

    Finalizes an instance of the AssetReferenceBase class.

    Declaration
    public ~AssetReferenceBase()

    AssetReferenceBase()

    Initializes a new instance of the AssetReferenceBase class.

    Declaration
    public AssetReferenceBase() = default

    Fields

    _asset

    Declaration
    protected Asset* _asset = nullptr
    Field Value
    Asset

    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()

    Gets the asset ID or Guid::Empty if not set.

    Declaration
    public Guid GetID() const
    Returns
    Guid

    GetManagedInstance()

    Gets managed instance object (or null if no asset set).

    Declaration
    public MObject* GetManagedInstance() const
    Returns
    MObject

    OnLoaded(Asset* asset)

    Declaration
    protected void OnLoaded(Asset* asset)
    Parameters
    Asset asset

    OnSet(Asset* asset)

    Declaration
    protected void OnSet(Asset* asset)
    Parameters
    Asset asset

    OnUnloaded(Asset* asset)

    Declaration
    protected void OnUnloaded(Asset* asset)
    Parameters
    Asset asset

    ToString()

    Gets the asset property value as string.

    Declaration
    public String ToString() const
    Returns
    String

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat