#include <SliceAsset.h>
Inherits AZ::Data::AssetData.
Inherited by AZ::DynamicSliceAsset.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (SliceAsset, AZ::SystemAllocator) | |
AZ_RTTI (SliceAsset, "{C62C7A87-9C09-4148-A985-12F2C99C0A45}", AssetData) | |
SliceAsset (const Data::AssetId &assetId=Data::AssetId()) | |
bool | SetData (Entity *entity, SliceComponent *component, bool deleteExisting=true) |
Entity * | GetEntity () |
SliceComponent * | GetComponent () |
virtual SliceAsset * | Clone () |
bool | HandleAutoReload () override |
void | SetIgnoreNextAutoReload (bool ignoreNextAutoReload) |
Public Member Functions inherited from AZ::Data::AssetData | |
AZ_CLASS_ALLOCATOR (AssetData, SystemAllocator) | |
AZ_RTTI (AssetData, "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}") | |
AssetData (const AssetId &assetId=AssetId(), AssetStatus status=AssetStatus::NotLoaded) | |
void | Acquire () |
void | Release () |
void | AcquireWeak () |
void | ReleaseWeak () |
bool | IsReady () const |
bool | IsError () const |
bool | IsLoading (bool includeQueued=true) const |
AssetStatus | GetStatus () const |
const AssetId & | GetId () const |
AssetType | GetType () const |
int | GetUseCount () const |
int | GetCreationToken () const |
Static Public Member Functions | |
static const char * | GetFileFilter () |
static constexpr u32 | GetAssetSubId () |
Static Public Member Functions inherited from AZ::Data::AssetData | |
static void | Reflect (ReflectContext *context) |
Protected Attributes | |
Entity * | m_entity |
Root entity that should contain only the slice component. | |
SliceComponent * | m_component |
Slice component for this asset. | |
bool | m_ignoreNextAutoReload |
Protected Attributes inherited from AZ::Data::AssetData | |
AZStd::atomic_int | m_useCount { 0 } |
AZStd::atomic_int | m_weakUseCount { 0 } |
AZStd::atomic< AssetStatus > | m_status |
AssetId | m_assetId |
AssetHandler * | m_registeredHandler { nullptr } |
int | m_creationToken = s_defaultCreationToken |
AZStd::bitset< 32 > | m_flags |
Friends | |
class | SliceAssetHandler |
Additional Inherited Members | |
Public Types inherited from AZ::Data::AssetData | |
enum class | AssetStatus : int { NotLoaded , Queued , StreamReady , Loading , LoadedPreReady , ReadyPreNotify , Ready , Error } |
Protected Types inherited from AZ::Data::AssetData | |
enum class | AssetDataFlags : AZ::u32 { Requeue = 0 } |
Protected Member Functions inherited from AZ::Data::AssetData | |
virtual bool | IsRegisterReadonlyAndShareable () |
virtual bool | HandleAutoReload () |
bool | GetFlag (const AssetDataFlags &checkFlag) const |
void | SetFlag (const AssetDataFlags &checkFlag, bool setValue) |
bool | GetRequeue () const |
void | SetRequeue (bool requeue) |
void | RegisterWithHandler (AssetHandler *assetHandler) |
void | UnregisterWithHandler () |
AssetData (const AssetData &)=delete | |
Represents a Slice asset.
|
overridevirtual |
Invoked by the AssetManager to determine if this SliceAsset data object should be reloaded when a change to the asset on disk is detected. Checks the state of m_ignoreNextAutoReload to determine this and sets m_ignoreNextAutoReload to false at the end. During a Create Slice operation in Editor the reload is prevented as we have already built the asset in memory and a reload is not needed.
Reimplemented from AZ::Data::AssetData.
bool AZ::SliceAsset::SetData | ( | Entity * | entity, |
SliceComponent * | component, | ||
bool | deleteExisting = true |
||
) |
Overwrites the current asset data (if any) and set the asset ready (if not).
deleteExisting | deletes the existing entity on set (if one exist) |