Search Results for

    Show / Hide Table of Contents

    Class WeakAssetReferenceBase

    Asset reference utility that doesn't add reference to that asset. Handles asset unload event.

    Inheritance
    WeakAssetReferenceBase
    Inherited Members
    WeakAssetReferenceBase
    Assembly: FlaxEngine.dll
    File: Engine/Content/WeakAssetReference.h
    Syntax
    public class WeakAssetReferenceBase

    Constructors

    ~WeakAssetReferenceBase()

    Finalizes an instance of the WeakAssetReferenceBase class.

    Declaration
    public ~WeakAssetReferenceBase()

    WeakAssetReferenceBase()

    Initializes a new instance of the WeakAssetReferenceBase class.

    Declaration
    public WeakAssetReferenceBase() = default

    Fields

    _asset

    Declaration
    protected Asset* _asset = nullptr
    Field Value
    Asset

    Unload

    The asset unloading event (should cleanup refs to it).

    Declaration
    public EventType Unload
    Field Value
    EventType

    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

    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