Search Results for

    Show / Hide Table of Contents

    Class PreviewsCache

    Asset which contains set of asset items thumbnails (cached previews).

    Inheritance
    Object
    ScriptingObject
    ManagedScriptingObject
    Asset
    BinaryAsset
    TextureBase
    SpriteAtlas
    PreviewsCache
    Inherited Members
    TextureBase::_customData
    Asset::_deleteFileOnUnload
    BinaryAsset::_dependantAssets
    ScriptingObject::_gcHandle
    BinaryAsset::_header
    ScriptingObject::_id
    BinaryAsset::_isSaving
    Asset::_isVirtual
    Asset::_loadingTask
    Asset::_loadState
    TextureBase::_parent
    Asset::_refCount
    BinaryAsset::_storageRef
    TextureBase::_texture
    ScriptingObject::_type
    BinaryAsset::AddDependency(BinaryAsset* asset)
    Asset::AddReference()
    SpriteAtlas::AddSprite(const Sprite& sprite)
    Asset::Asset(const SpawnParams& params, const AssetInfo* info)
    TextureBase::CalculateChunkIndex(int32 mipIndex)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    TextureBase::CancelStreaming()
    ScriptingObject::Cast(ScriptingObject* obj)
    Asset::ChangeID(const Guid& newId)
    BinaryAsset::ClearDependencies()
    Asset::const
    BinaryAsset::createLoadingTask()
    Asset::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    Asset::DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData)
    ScriptingObject::Deleted
    Asset::DeleteManaged()
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    BinaryAsset::Dependencies
    Asset::DEPRECATED("Use GetReferences with assets and files parameter instead")
    Asset::DestroyManaged()
    PreviewsCache
    SpriteAtlas::FindSprite(const StringView& name)
    Object::Flags
    TextureBase::Format()
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    TextureBase::GetArraySize()
    BinaryAsset::GetChunk(int32 index)
    BinaryAsset::GetChunkData(int32 index, BytesContainer& data)
    BinaryAsset::GetChunkSize(int32 index)
    ScriptingObject::GetClass()
    TextureBase::GetCurrentMemoryUsage()
    ScriptingObject::GetID()
    BinaryAsset::GetImportMetadata(String& path, String& username)
    BinaryAsset::GetImportPath()
    ScriptingObject::GetManagedInstance()
    TextureBase::GetMemoryUsage()
    TextureBase::GetMipData(int32 mipIndex, int32& rowPitch, int32& slicePitch)
    TextureBase::GetMipData(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipDataCustomPitch(int32 mipIndex, uint32& rowPitch, uint32& slicePitch)
    TextureBase::GetMipDataWithLoading(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipLevels()
    BinaryAsset::GetOrCreateChunk(int32 index)
    ScriptingObject::GetOrCreateManagedInstance()
    TextureBase::GetOwnerLocker()
    BinaryAsset::GetPath()
    TextureBase::GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    TextureBase::GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Asset::GetReferences(Array<Guid, HeapAllocation>& assets, Array<String, HeapAllocation>& files)
    Asset::GetReferences()
    Asset::GetReferencesCount()
    TextureBase::GetResidentMipLevels()
    BinaryAsset::GetSerializedVersion()
    SpriteAtlas::GetSprite(int32 index)
    SpriteAtlas::GetSpriteArea(int32 index, Rectangle& result)
    SpriteAtlas::GetSpritesCount()
    TextureBase::GetTexture()
    TextureBase::GetTextureData(TextureData& result, bool copyData=true)
    TextureBase::GetTextureGroup()
    TextureBase::GetTextureMipData(TextureMipData& result, int32 mipIndex = 0, int32 arrayIndex = 0, bool copyData=true)
    TextureBase::GetTotalMemoryUsage()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Asset::GetTypeName()
    BinaryAsset::HasChunk(int32 index)
    BinaryAsset::HasChunkLoaded(int32 index)
    BinaryAsset::HasDependenciesModified()
    ScriptingObject::HasManagedInstance()
    TextureBase::HasStreamingError()
    TextureBase::Height()
    TextureBase::Init(InitData* initData)
    TextureBase::Init(InitData&& initData)
    BinaryAsset::Init(const FlaxStorageReference& storage, AssetHeader& header)
    BinaryAsset::Init(AssetInitData& initData)
    TextureBase::init(AssetInitData& initData)
    Asset::InitAsVirtual()
    BinaryAsset::InitVirtual(AssetInitData& initData)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Asset::IsInternalType()
    Asset::IsLoaded()
    ScriptingObject::IsRegistered()
    Asset::IsVirtual()
    Asset::LastLoadFailed()
    BinaryAsset::loadAsset()
    BinaryAsset::LoadChunk(int32 chunkIndex)
    BinaryAsset::LoadChunks(AssetChunksFlag chunks)
    SpriteAtlas::LoadSprites(ReadStream& stream)
    PreviewsCache
    TextureBase::LockData()
    Asset::Locker
    ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
    BinaryAsset::Metadata
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Asset::OnCheckSave(const StringView& path=StringView::Empty)
    BinaryAsset::OnDeleteObject()
    BinaryAsset::OnDependencyModified(BinaryAsset* asset)
    Asset::onLoad(LoadAssetTask* task)
    Asset::onLoaded()
    Asset::OnLoaded
    Asset::onLoaded_MainThread()
    Asset::OnManagedInstanceDeleted()
    Asset::OnReloading
    BinaryAsset::onRename(const StringView& newPath)
    Asset::OnScriptingDispose()
    Asset::onUnload_MainThread()
    Asset::OnUnloaded
    ScriptingObject::RegisterObject()
    BinaryAsset::Reimport()
    BinaryAsset::ReleaseChunk(int32 index)
    BinaryAsset::ReleaseChunks()
    BinaryAsset::releaseStorage()
    Asset::Reload()
    Asset::RemoveReference()
    SpriteAtlas::RemoveSprite(int32 index)
    BinaryAsset::RequestChunkDataAsync(int32 index)
    TextureBase::RequestMipDataAsync(int32 mipIndex)
    Asset::Save(const StringView& path=StringView::Empty)
    BinaryAsset::SaveAsset(AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    SpriteAtlas::SaveSprites()
    BinaryAsset::SaveToAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    BinaryAsset::SetChunk(int32 index, const Span<byte>& data)
    ManagedScriptingObject::SetManagedInstance(MObject* instance)
    TextureBase::SetPixels(const Span<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    TextureBase::SetPixels(const Span<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    SpriteAtlas::SetSprite(int32 index, const Sprite& value)
    TextureBase::SetTextureGroup(int32 textureGroup)
    Asset::ShouldDeleteFileOnUnload()
    TextureBase::Size()
    PreviewsCache
    SpriteAtlas::Sprites
    Asset::startLoading()
    BinaryAsset::Storage
    TextureBase::StreamingTexture()
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Asset::ToString()
    ScriptingObject::UnregisterObject()
    Asset::WaitForLoaded(double timeoutInMilliseconds=30000.0)
    TextureBase::Width()
    BinaryAsset::~BinaryAsset()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Editor/Content/PreviewsCache.h
    Syntax
    public class PreviewsCache : public SpriteAtlas

    Methods

    Create(const StringView& outputPath)

    Creates a new atlas.

    Declaration
    public static bool Create(const StringView& outputPath)
    Parameters
    StringView outputPath

    The output asset file path.

    Returns
    bool

    True if this previews cache is flushing, otherwise false.

    FindSlot(const Guid& id)

    Finds the preview icon for given asset ID.

    Declaration
    public SpriteHandle FindSlot(const Guid& id)
    Parameters
    Guid id

    The asset id to find preview for it.

    Returns
    SpriteHandle

    The output sprite slot handle or invalid if invalid in nothing found.

    Flush()

    Flushes atlas data from the GPU to the asset storage (saves data).

    Declaration
    public void Flush()

    getChunksToPreload()

    Gets packed chunks indices to preload before asset loading action

    Declaration
    protected virtual AssetChunksFlag getChunksToPreload() const override
    Returns
    AssetChunksFlag

    Chunks to load flags

    Overrides
    BinaryAsset::getChunksToPreload()

    HasFreeSlot()

    Determines whether this atlas has one or more free slots for the asset preview.

    Declaration
    public bool HasFreeSlot() const
    Returns
    bool

    IsFlushing()

    Determines whether this instance is flushing.

    Declaration
    public bool IsFlushing() const
    Returns
    bool

    True if this previews cache is flushing, otherwise false.

    IsReady()

    Determines whether this atlas is ready (is loaded and has texture streamed).

    Declaration
    public bool IsReady() const
    Returns
    bool

    load()

    Load data from the chunks

    Declaration
    protected virtual LoadResult load() override
    Returns
    LoadResult

    Loading result

    Overrides
    BinaryAsset::load()

    OccupySlot(GPUTexture* source, const Guid& id)

    Occupies the atlas slot.

    Declaration
    public SpriteHandle OccupySlot(GPUTexture* source, const Guid& id)
    Parameters
    GPUTexture source

    The source texture to insert.

    Guid id

    The asset identifier.

    Returns
    SpriteHandle

    The added sprite slot handle or invalid if invalid in failed to occupy slot.

    ReleaseSlot(const Guid& id)

    Releases the used slot.

    Declaration
    public bool ReleaseSlot(const Guid& id)
    Parameters
    Guid id

    The asset identifier.

    Returns
    bool

    True if slot has been release, otherwise it was not found.

    unload(bool isReloading)

    Unloads asset data

    Declaration
    protected virtual void unload(bool isReloading) override
    Parameters
    bool isReloading

    True if asset is reloading data, otherwise false.

    Overrides
    Asset::unload(bool isReloading)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat