Fix crash when reimporting sprite atlas

#494
This commit is contained in:
Wojtek Figat
2021-05-12 13:58:23 +02:00
parent 0509f9710f
commit 36d06ccaa3
2 changed files with 20 additions and 14 deletions

View File

@@ -111,32 +111,21 @@ public:
/// <summary>
/// Gets the sprites count.
/// </summary>
/// <returns>The sprites count.</returns>
API_PROPERTY() int32 GetSpritesCount() const
{
return Sprites.Count();
}
API_PROPERTY() int32 GetSpritesCount() const;
/// <summary>
/// Gets the sprite data.
/// </summary>
/// <param name="index">The index.</param>
/// <returns>The sprite data.</returns>
API_FUNCTION() Sprite GetSprite(const int32 index) const
{
return Sprites[index];
}
API_FUNCTION() Sprite GetSprite(int32 index) const;
/// <summary>
/// Sets the sprite data.
/// </summary>
/// <param name="index">The index.</param>
/// <param name="value">The sprite data.</param>
/// <returns>The sprite handle.</returns>
API_FUNCTION() void SetSprite(const int32 index, API_PARAM(Ref) const Sprite& value)
{
Sprites[index] = value;
}
API_FUNCTION() void SetSprite(int32 index, API_PARAM(Ref) const Sprite& value);
/// <summary>
/// Finds the sprite by the name.