Search Results for

    Show / Hide Table of Contents

    Class AssetReference

    Asset reference utility. Keeps reference to the linked asset object and handles load/unload events.

    Inheritance
    AssetReferenceBase
    AssetReference
    Inherited Members
    AssetReferenceBase::_asset
    AssetReferenceBase::AssetReferenceBase()
    AssetReference
    AssetReferenceBase::Changed
    AssetReferenceBase::GetID()
    AssetReferenceBase::GetManagedInstance()
    AssetReferenceBase::Loaded
    AssetReferenceBase::OnLoaded(Asset* asset)
    AssetReferenceBase::OnSet(Asset* asset)
    AssetReferenceBase::OnUnloaded(Asset* asset)
    AssetReferenceBase::ToString()
    AssetReference
    AssetReferenceBase::Unload
    AssetReferenceBase::~AssetReferenceBase()
    Assembly: FlaxEngine.dll
    File: Engine/Content/AssetReference.h
    Syntax
    public class AssetReference<T> : public AssetReferenceBase
    Type Parameters
    T

    Constructors

    ~AssetReference()

    Finalizes an instance of the AssetReference class.

    Declaration
    public ~AssetReference()

    AssetReference()

    Initializes a new instance of the AssetReference class.

    Declaration
    public AssetReference()

    AssetReference(AssetReference&& other)

    Declaration
    public AssetReference(AssetReference&& other) noexcept
    Parameters
    AssetReference other

    AssetReference(const AssetReference& other)

    Initializes a new instance of the AssetReference class.

    Declaration
    public AssetReference(const AssetReference& other)
    Parameters
    AssetReference other

    The other.

    AssetReference(T* asset)

    Initializes a new instance of the AssetReference class.

    Declaration
    public AssetReference(T* asset)
    Parameters
    T asset

    The asset to set.

    Methods

    As()

    Gets the asset as a given type (static cast).

    Declaration
    public U* As() const
    Returns
    U

    Type Parameters
    typename U

    Get()

    Gets the asset.

    Declaration
    public T* Get() const
    Returns
    T

    operator bool()

    Implicit conversion to the asset.

    Declaration
    public operator bool() const
    Returns
    FORCE_INLINE

    operator T*()

    Implicit conversion to the bool.

    Declaration
    public operator T*() const
    Returns
    FORCE_INLINE

    operator!=(const AssetReference& other)

    Declaration
    public bool operator!=(const AssetReference& other) const
    Parameters
    AssetReference other

    Returns
    bool

    operator!=(T* other)

    Declaration
    public bool operator!=(T* other) const
    Parameters
    T other

    Returns
    bool

    operator=(AssetReference&& other)

    Declaration
    public AssetReference operator=(AssetReference&& other)
    Parameters
    AssetReference other

    Returns
    AssetReference

    operator=(const AssetReference& other)

    Declaration
    public AssetReference operator=(const AssetReference& other)
    Parameters
    AssetReference other

    Returns
    AssetReference

    operator=(const Guid& id)

    Declaration
    public AssetReference operator=(const Guid& id)
    Parameters
    Guid id

    Returns
    AssetReference

    operator=(T* other)

    Declaration
    public AssetReference operator=(T* other)
    Parameters
    T other

    Returns
    AssetReference

    operator==(const AssetReference& other)

    Declaration
    public bool operator==(const AssetReference& other) const
    Parameters
    AssetReference other

    Returns
    bool

    operator==(T* other)

    Declaration
    public bool operator==(T* other) const
    Parameters
    T other

    Returns
    bool

    operator->()

    Implicit conversion to the asset.

    Declaration
    public T* operator->() const
    Returns
    T

    Set(T* asset)

    Sets the asset reference.

    Declaration
    public void Set(T* asset)
    Parameters
    T asset

    The asset.

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