Class AssetReference
Asset reference utility. Keeps reference to the linked asset object and handles load/unload events.
Inheritance
AssetReference
Inherited Members
AssetReference
AssetReference
Assembly: FlaxEngine.dll
File: Engine/Content/AssetReference.h
Syntax
public class AssetReference<T> : public AssetReferenceBase
Type Parameters
T
|
Constructors
~AssetReference()
AssetReference()
AssetReference(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)
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. |