Class SpriteHandle
Handle to sprite atlas slot with a single sprite texture.
Inheritance
System.Object
SpriteHandle
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class SpriteHandle : ValueType
Constructors
SpriteHandle(SpriteAtlas, Int32)
Initializes a new instance of the Sprite struct.
Declaration
public SpriteHandle(SpriteAtlas atlas, int index)
Parameters
SpriteAtlas
atlas
The atlas. |
System.Int32
index
The index. |
Fields
Atlas
Index
The atlas sprites array index.
Declaration
public int Index
Field Value
System.Int32
|
Invalid
Properties
Area
Gets or sets the sprite area in atlas (in normalized atlas coordinates [0;1]).
Declaration
[NoSerialize]
public Rectangle Area { get; set; }
Property Value
Rectangle
|
Default
The default SpriteHandle.
Declaration
public static SpriteHandle Default { get; }
Property Value
SpriteHandle
|
IsValid
Returns true if sprite is valid.
Declaration
public bool IsValid { get; }
Property Value
System.Boolean
|
Location
Gets or sets the sprite location (in pixels).
Declaration
[NoSerialize]
public Float2 Location { get; set; }
Property Value
Float2
|
Name
Gets or sets the sprite name.
Declaration
[NoSerialize]
public string Name { get; set; }
Property Value
System.String
|
Size
Gets or sets the sprite size (in pixels).
Declaration
[NoSerialize]
public Float2 Size { get; set; }
Property Value
Float2
|