I have read all about changing sprite image from resources but i think i m doing something wrong.
First of all i loaded new asset (image 200x200), then in Sprite Editor split that in four squares (renamed to: flag1, flag2, flag3, flag4).
Spritemode of image set to “multiple”. All applied.
In some moving box script i want to load part of the image i called flag1 when press for ex.RightArrow
(object called CUBE and script is attached to it, CUBE already had some image/sprite)
void CheckUserInput () {
if (Input.GetKeyDown(KeyCode.RightArrow)) {
transform.position = new Vector3(1,0,0);
Resources.Load(“flag1”);
nothing happened