I can access all the members of the sprite sheet, from 1 to 20 instead of the 0-19 I would have expected.
What is it I don’t get about sprite-multiple objects indexing?
function Start () {
var stripIcons = Resources.LoadAll("SpriteStrip");
var iconTexture = stripIcons[0];
print(typeof(iconTexture));
var iconSprite = stripIcons[1];
print(typeof(iconSprite));
}
Thanx.
So the first element in that object is a texture and the rest are sprites?!
Can you point me where in the doc I can have a look at this strange object?
I can’t figure at what point what becomes an array…
Yes, the first entry is the texture, the rest are sprites. You can’t have sprites without a texture. It’s not defined anywhere that the first entry is always the texture, though, so it might be best not to take that for granted.