Search Results for

    Show / Hide Table of Contents

    Struct SpriteHandle

    Handle to sprite atlas slot with a single sprite texture.

    Inherited Members
    ISerializable::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
    ISerializable::DeserializeIfExists(DeserializeStream& stream, const char* memberName, ISerializeModifier* modifier)
    SpriteHandle
    ISerializable::Serialize(SerializeStream& stream, const void* otherObj)
    SpriteHandle
    SpriteHandle
    ISerializable::~ISerializable()
    Assembly: FlaxEngine.dll
    File: Engine/Render2D/SpriteAtlas.h
    Syntax
    public struct SpriteHandle : public ISerializable

    Constructors

    SpriteHandle()

    Initializes a new instance of the SpriteHandle struct.

    Declaration
    public SpriteHandle()

    SpriteHandle(SpriteAtlas* atlas, int32 index)

    Initializes a new instance of the SpriteHandle struct.

    Declaration
    public SpriteHandle(SpriteAtlas* atlas, int32 index)
    Parameters
    SpriteAtlas atlas

    The sprite atlas.

    int32 index

    The sprite slot index.

    Fields

    Atlas

    The parent atlas.

    Declaration
    public AssetReference<SpriteAtlas> Atlas
    Field Value
    AssetReference<SpriteAtlas>

    Index

    The atlas sprites array index.

    Declaration
    public int32 Index
    Field Value
    int32

    Invalid

    Invalid sprite handle.

    Declaration
    public static SpriteHandle Invalid
    Field Value
    SpriteHandle

    Methods

    GetAtlasTexture()

    Gets the sprite atlas texture.

    Declaration
    public GPUTexture* GetAtlasTexture() const
    Returns
    GPUTexture

    The texture object.

    GetSprite(Sprite* result)

    Tries to get sprite info.

    Declaration
    public bool GetSprite(Sprite* result) const
    Parameters
    Sprite result

    The result.

    Returns
    bool

    True if data is valid, otherwise false.

    IsValid()

    Returns true if sprite is valid.

    Declaration
    public bool IsValid() const
    Returns
    bool

    True if this sprite handle is valid, otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat