Search Results for

    Show / Hide Table of Contents

    Class SoftAssetReference

    The asset soft reference. Asset gets referenced (loaded) on actual use (ID reference is resolving it).

    Inheritance
    SoftAssetReferenceBase
    SoftAssetReference
    Inherited Members
    SoftAssetReferenceBase::_asset
    SoftAssetReferenceBase::_id
    SoftAssetReference
    SoftAssetReferenceBase::Changed
    SoftAssetReferenceBase::GetID()
    SoftAssetReferenceBase::OnResolve(const ScriptingTypeHandle& type)
    SoftAssetReferenceBase::OnSet(Asset* asset)
    SoftAssetReferenceBase::OnSet(const Guid& id)
    SoftAssetReferenceBase::OnUnloaded(Asset* asset)
    SoftAssetReferenceBase::SoftAssetReferenceBase()
    SoftAssetReferenceBase::ToString()
    SoftAssetReference
    SoftAssetReferenceBase::~SoftAssetReferenceBase()
    Assembly: FlaxEngine.dll
    File: Engine/Content/SoftAssetReference.h
    Syntax
    public class SoftAssetReference<T> : public SoftAssetReferenceBase
    Type Parameters
    T

    Constructors

    ~SoftAssetReference()

    Finalizes an instance of the SoftAssetReference class.

    Declaration
    public ~SoftAssetReference()

    SoftAssetReference()

    Initializes a new instance of the SoftAssetReference class.

    Declaration
    public SoftAssetReference()

    SoftAssetReference(const Guid& id)

    Declaration
    public SoftAssetReference(const Guid& id)
    Parameters
    Guid id

    SoftAssetReference(const SoftAssetReference& other)

    Initializes a new instance of the SoftAssetReference class.

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

    The other.

    SoftAssetReference(SoftAssetReference&& other)

    Declaration
    public SoftAssetReference(SoftAssetReference&& other)
    Parameters
    SoftAssetReference other

    SoftAssetReference(T* asset)

    Initializes a new instance of the SoftAssetReference class.

    Declaration
    public SoftAssetReference(T* asset)
    Parameters
    T asset

    The asset to set.

    Methods

    As()

    Declaration
    public U* As() const
    Returns
    U

    Type Parameters
    typename U

    Get()

    Gets the asset (or null if unassigned).

    Declaration
    public T* Get() const
    Returns
    T

    GetManagedInstance()

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

    Declaration
    public MObject* GetManagedInstance() const
    Returns
    MObject

    GetOrCreateManagedInstance()

    Gets the managed instance object or creates it if missing or null if not assigned.

    Declaration
    public MObject* GetOrCreateManagedInstance() const
    Returns
    MObject

    HasManagedInstance()

    Determines whether asset is assigned and managed instance of the asset is alive.

    Declaration
    public bool HasManagedInstance() const
    Returns
    bool

    operator bool()

    Declaration
    public operator bool() const
    Returns
    FORCE_INLINE

    operator T*()

    Declaration
    public operator T*() const
    Returns
    FORCE_INLINE

    operator!=(const Guid& other)

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

    Returns
    bool

    operator!=(const SoftAssetReference& other)

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

    Returns
    bool

    operator!=(T* other)

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

    Returns
    bool

    operator=(const Guid& id)

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

    Returns
    SoftAssetReference

    operator=(const SoftAssetReference& other)

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

    Returns
    SoftAssetReference

    operator=(const T& other)

    Declaration
    public SoftAssetReference operator=(const T& other)
    Parameters
    T other

    Returns
    SoftAssetReference

    operator=(SoftAssetReference&& other)

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

    Returns
    SoftAssetReference

    operator=(T* other)

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

    Returns
    SoftAssetReference

    operator==(const Guid& other)

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

    Returns
    bool

    operator==(const SoftAssetReference& other)

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

    Returns
    bool

    operator==(T* other)

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

    Returns
    bool

    operator->()

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

    Set(const Guid& id)

    Sets the asset.

    Declaration
    public void Set(const Guid& id)
    Parameters
    Guid id

    The object ID. Uses Scripting to find the registered asset of the given ID.

    Returns
    void

    Set(T* asset)

    Sets the asset.

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

    The asset.

    Returns
    void

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