Class WeakAssetReference
Asset reference utility that doesn't add reference to that asset. Handles asset unload event.
Inheritance
WeakAssetReference
Inherited Members
WeakAssetReference
Assembly: FlaxEngine.dll
File: Engine/Content/WeakAssetReference.h
Syntax
public class WeakAssetReference<T> : public WeakAssetReferenceBase
Type Parameters
T
|
Constructors
~WeakAssetReference()
WeakAssetReference()
WeakAssetReference(const WeakAssetReference& other)
Initializes a new instance of the WeakAssetReference class.
Declaration
public WeakAssetReference(const WeakAssetReference& other)
Parameters
WeakAssetReference
other
The other. |
WeakAssetReference(T* asset)
Initializes a new instance of the WeakAssetReference class.
Declaration
public WeakAssetReference(T* asset)
Parameters
T
asset
The asset to set. |
WeakAssetReference(WeakAssetReference&& other)
Declaration
public WeakAssetReference(WeakAssetReference&& other)
Parameters
WeakAssetReference
other
|
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 Guid& id)
Declaration
public WeakAssetReference operator=(const Guid& id)
Parameters
Guid
id
|
Returns
WeakAssetReference
|
operator=(const WeakAssetReference& other)
Declaration
public WeakAssetReference operator=(const WeakAssetReference& other)
Parameters
WeakAssetReference
other
|
Returns
WeakAssetReference
|
operator=(T* other)
Declaration
public WeakAssetReference operator=(T* other)
Parameters
T
other
|
Returns
WeakAssetReference
|
operator=(WeakAssetReference&& other)
Declaration
public WeakAssetReference operator=(WeakAssetReference&& other)
Parameters
WeakAssetReference
other
|
Returns
WeakAssetReference
|
operator==(const WeakAssetReference& other)
Declaration
public bool operator==(const WeakAssetReference& other) const
Parameters
WeakAssetReference
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. |