Im using a script off of the wiki to animate my texture:
This basically is what turns a 2D SpriteSheet into an animated character.
Here’s the code I’m using to assign keys to each row of the SprieSheet:
I have a 4x4 Sprite Sheet, the rows start at 0 instead of 1. (row = 0 would be the first row)
Anyway, As you can see I assigned multiple keys to two specific rows, you can read the comments in the code for more detail. But for some reason its only showing row 0 and row 1
And the Unity console isnt even giving me errors.
Sprite Sheet:
Row 0 is my character just stationary
Row 1 is of my character running
Row 2 is of my Character shooting, while stationary
Row 3 is of my character Shooting, while running
The game plays as if Rows 2 and 3 just dont exist, nor do the lines in the code.
Sorry if I dont explain very well, Im very, very new to Java and Unity.
Anyone have an idea whats going wrong?