Make logerror better

This commit is contained in:
Sofia 2019-08-19 01:55:08 +03:00
parent 343cf5bc3a
commit 2b7cc196f4

View File

@ -17,7 +17,7 @@ namespace Saltosion.OneWeapon.Environment {
public bool SetSprite(int Index) { public bool SetSprite(int Index) {
if (Index < 0 || Index >= Sprites.Count) { if (Index < 0 || Index >= Sprites.Count) {
Debug.LogError("Cannot change sprite to an index that does not exist!"); Debug.LogError("Cannot change sprite to an index that does not exist! (" + Index + ") for " + gameObject.name);
return false; return false;
} }
Sprite.sprite = Sprites[Index]; Sprite.sprite = Sprites[Index];