Answer the question
In order to leave comments, you need to log in
How to assign a keyboard button to a specific sprite?
Urgent, need help: how to assign a button to a specific sprite?
Need to assign a sprite to the z button, how?
Here's a snippet of a crude example:
Dictionary dict = new Dictionary();
dict.Add(KeyCode.Z, );
Answer the question
In order to leave comments, you need to log in
What should be done when the button is pressed?
Can be an array or a list of sprites
List<Sprite> img = new List<Sprite>();
Dictionary dict = new Dictionary();
dict.Add(KeyCode.Z, img[0]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question