Struct SpriteHandle
Handle to sprite atlas slot with a single sprite texture.
Inherited Members
SpriteHandle
SpriteHandle
SpriteHandle
Assembly: FlaxEngine.dll
File: Engine/Render2D/SpriteAtlas.h
Syntax
public struct SpriteHandle : public ISerializable
Constructors
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
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. |